OpenVSP API Documentation 3.42.0
 
Loading...
Searching...
No Matches
Variable Preset Functions

This group of functions can be used to add, remove, and modify Variable Presets through the API. Click here to return to the main page. More...

Functions

string vsp::AddVarPresetGroup (const std::string &group_name)
 
string vsp::AddVarPresetSetting (const std::string &group_id, const std::string &setting_name)
 
void vsp::AddVarPresetParm (const std::string &group_id, const std::string &parm_id)
 
void vsp::DeleteVarPresetGroup (const std::string &group_id)
 
void vsp::DeleteVarPresetSetting (const std::string &group_id, const std::string &setting_id)
 
void vsp::DeleteVarPresetParm (const std::string &group_id, const std::string &parm_id)
 
void vsp::SetVarPresetParmVal (const std::string &group_id, const std::string &setting_id, const std::string &parm_id, double parm_val)
 
double vsp::GetVarPresetParmVal (const std::string &group_id, const std::string &setting_id, const std::string &parm_id)
 
std::string vsp::GetGroupName (const std::string &group_id)
 
std::string vsp::GetSettingName (const std::string &setting_id)
 
void vsp::SetGroupName (const std::string &group_id, const std::string &group_name)
 
void vsp::SetSettingName (const std::string &setting_id, const std::string &setting_name)
 
std::vector< std::string > vsp::GetVarPresetGroups ()
 
std::vector< std::string > vsp::GetVarPresetSettings (const std::string &group_id)
 
std::vector< std::string > vsp::GetVarPresetParmIDs (const std::string &group_id)
 
std::vector< double > vsp::GetVarPresetParmVals (const std::string &setting_id)
 
void vsp::SetVarPresetParmVals (const std::string &setting_id, const std::vector< double > &parm_vals)
 
void vsp::SaveVarPresetParmVals (const std::string &group_id, const std::string &setting_id)
 
void vsp::ApplyVarPresetSetting (const std::string &group_id, const std::string &setting_id)
 

Detailed Description

Function Documentation

◆ AddVarPresetGroup()

string vsp::AddVarPresetGroup ( const std::string & group_name)
extern

Add a Variable Preset Group

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
string AddVarPresetGroup(const std::string &group_name)
Parameters
[in]group_namestring Name for Var Preset Group
Returns
string Var Preset Group ID

◆ AddVarPresetParm()

void vsp::AddVarPresetParm ( const std::string & group_id,
const std::string & parm_id )
extern

Add a Parm to the Variable Preset Group

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
std::string FindParm(const std::string &parm_container_id, const std::string &parm_name, const std::string &group_name)
string AddVarPresetSetting(const std::string &group_id, const std::string &setting_name)
void AddVarPresetParm(const std::string &group_id, const std::string &parm_id)
Parameters
[in]group_idstring Var Preset Group ID
[in]parm_idstring Parm ID

◆ AddVarPresetSetting()

string vsp::AddVarPresetSetting ( const std::string & group_id,
const std::string & setting_name )
extern

Add a Setting to the Variable Preset Group

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid =AddVarPresetSetting( gid, "Coarse" );
Parameters
[in]group_idstring Var Preset Group ID
[in]setting_namestring Var Preset Setting Name
Returns
string Var Preset Setting ID

◆ ApplyVarPresetSetting()

void vsp::ApplyVarPresetSetting ( const std::string & group_id,
const std::string & setting_id )
extern

Apply Parm values for Var Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
void ApplyVarPresetSetting(const std::string &group_id, const std::string &setting_id)
void Update(bool update_managers=true)
Parameters
[in]group_idstring Var Preset Group ID
[in]setting_idstring Var Preset Setting ID

◆ DeleteVarPresetGroup()

void vsp::DeleteVarPresetGroup ( const std::string & group_id)
extern

Delete Variable Preset Group (and all contained settings)

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
void DeleteVarPresetGroup(const std::string &group_id)
Parameters
[in]group_idstring Var Preset Group ID

◆ DeleteVarPresetParm()

void vsp::DeleteVarPresetParm ( const std::string & group_id,
const std::string & parm_id )
extern

Delete Parm from Variable Preset Group

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
void DeleteVarPresetParm(const std::string &group_id, const std::string &parm_id)
Parameters
[in]group_idstring Var Preset Group ID
[in]parm_idstring Var Parm ID

◆ DeleteVarPresetSetting()

void vsp::DeleteVarPresetSetting ( const std::string & group_id,
const std::string & setting_id )
extern

Delete Variable Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
void DeleteVarPresetSetting(const std::string &group_id, const std::string &setting_id)
Parameters
[in]group_idstring Var Preset Group ID
[in]setting_idstring Var Preset Setting ID

◆ GetGroupName()

std::string vsp::GetGroupName ( const std::string & group_id)
extern

Get Variable Preset group name

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string name = GetGroupName( gid );
std::string GetGroupName(const std::string &group_id)
Parameters
[in]group_idstring Var Preset Group ID
Returns
string Var Preset Group name

◆ GetSettingName()

std::string vsp::GetSettingName ( const std::string & setting_id)
extern

Get Variable Preset Setting name

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string name = GetSettingName( sid );
std::string GetSettingName(const std::string &setting_id)
Parameters
[in]setting_idstring Var Preset Setting ID
Returns
string Var Preset Setting name

◆ GetVarPresetGroups()

std::vector< std::string > vsp::GetVarPresetGroups ( )
extern

Get group_ids for Variable Preset Groups

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
array <string> group_ids = GetVarPresetGroups();
std::vector< std::string > GetVarPresetGroups()
Returns
array<string> Array of Variable Preset Group IDs

◆ GetVarPresetParmIDs()

std::vector< std::string > vsp::GetVarPresetParmIDs ( const std::string & group_id)
extern

Get ParmIDs for Variable Preset Group

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
array <string> parmids = GetVarPresetParmIDs( gid );
std::vector< std::string > GetVarPresetParmIDs(const std::string &group_id)
Parameters
[in]group_idstring Var Preset Group ID
Returns
array<string> Array of Variable Preset Group ParmIDs

◆ GetVarPresetParmVal()

double vsp::GetVarPresetParmVal ( const std::string & group_id,
const std::string & setting_id,
const std::string & parm_id )
extern

Get value for Parm in Var Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
double val = GetVarPresetParmVal( gid, sid, p1 );
double GetVarPresetParmVal(const std::string &group_id, const std::string &setting_id, const std::string &parm_id)
Parameters
[in]group_idstring Var Preset Group ID
[in]setting_idstring Var Preset Setting ID
[in]parm_idstring Var Parm ID
Returns
double Var Preset Parm value

◆ GetVarPresetParmVals()

std::vector< double > vsp::GetVarPresetParmVals ( const std::string & setting_id)
extern

Get Parm values for Variable Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
array < double > parmval_vec = GetVarPresetParmVals( sid );
std::vector< double > GetVarPresetParmVals(const std::string &setting_id)
Parameters
[in]setting_idstring Var Preset Setting ID
Returns
array<double> Var Preset Parm values for Setting

◆ GetVarPresetSettings()

std::vector< std::string > vsp::GetVarPresetSettings ( const std::string & group_id)
extern

Get Setting IDs for Variable Preset Group

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
array <string> settingids = GetVarPresetSettings( gid );
std::vector< std::string > GetVarPresetSettings(const std::string &group_id)
Parameters
[in]group_idstring Var Preset Group ID
Returns
array<string> Array of Variable Preset Group ParmIDs

◆ SaveVarPresetParmVals()

void vsp::SaveVarPresetParmVals ( const std::string & group_id,
const std::string & setting_id )
extern

Save current Parm values to Variable Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
void SaveVarPresetParmVals(const std::string &group_id, const std::string &setting_id)
Parameters
[in]group_idstring Var Preset Group ID
[in]setting_idstring Var Preset Setting ID

◆ SetGroupName()

void vsp::SetGroupName ( const std::string & group_id,
const std::string & group_name )
extern

Set Variable Preset group name

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
SetGroupName( gid, "Resolution" );
void SetGroupName(const std::string &group_id, const std::string &group_name)
Parameters
[in]group_idstring Var Preset Group ID
[in]group_namestring New Var Preset Group name

◆ SetSettingName()

void vsp::SetSettingName ( const std::string & setting_id,
const std::string & setting_name )
extern

Set Variable Preset Setting name

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
SetSettingName( sid, "Low" );
void SetSettingName(const std::string &setting_id, const std::string &setting_name)
Parameters
[in]setting_idstring Var Preset Setting ID
[in]setting_namestring New Var Preset Setting name

◆ SetVarPresetParmVal()

void vsp::SetVarPresetParmVal ( const std::string & group_id,
const std::string & setting_id,
const std::string & parm_id,
double parm_val )
extern

Set value for Parm in Var Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
SetVarPresetParmVal( gid, sid, p1, 51 );
void SetVarPresetParmVal(const std::string &group_id, const std::string &setting_id, const std::string &parm_id, double parm_val)
Parameters
[in]group_idstring Var Preset Group ID
[in]setting_idstring Var Preset Setting ID
[in]parm_idstring Var Parm ID
[in]parm_valdouble Parm value

◆ SetVarPresetParmVals()

void vsp::SetVarPresetParmVals ( const std::string & setting_id,
const std::vector< double > & parm_vals )
extern

Set Parm values for Variable Preset Setting

// Add Pod Geom
string pod1 = AddGeom( "POD", "" );
string gid = AddVarPresetGroup( "Tess" );
string sid = AddVarPresetSetting( gid, "Coarse" );
string p1 = FindParm( pod1, "Tess_U", "Shape" );
AddVarPresetParm( gid, p1 );
array <double> vals = { 45 };
SetVarPresetParmVals( sid, vals );
void SetVarPresetParmVals(const std::string &setting_id, const std::vector< double > &parm_vals)
Parameters
[in]setting_idstring Var Preset Setting ID
Returns
array<double> Array of Variable Preset Group Parm values