All Parms in OpenVSP are stored in Parm Containers. The functions in this group can be used to work with Parm Containers through the API. Click here to return to the main page.
More...
◆ AddUserParm()
| string vsp::AddUserParm |
( |
int | type, |
|
|
const string & | name, |
|
|
const string & | group ) |
|
extern |
Function to add a new user Parm of input type, name, and group
string AddUserParm(int type, const string &name, const string &group)
void SetParmDescript(const std::string &parm_id, const std::string &desc)
double SetParmValLimits(const std::string &parm_id, double val, double lower_limit, double upper_limit)
- See also
- PARM_TYPE
- Parameters
-
| [in] | type | int Parm type enum (i.e. PARM_DOUBLE_TYPE) |
| [in] | name | string Parm name |
| [in] | group | string Parm group |
- Returns
- string Parm ID
◆ DeleteAllUserParm()
| void vsp::DeleteAllUserParm |
( |
| ) |
|
|
extern |
Get the user parm container ID
◆ DeleteUserParm()
| void vsp::DeleteUserParm |
( |
const std::string & | id | ) |
|
|
extern |
Get the user parm container ID
if ( int( id_arr.size() ) > n )
{
}
std::vector< std::string > GetAllUserParms()
void DeleteUserParm(const std::string &id)
int GetNumPredefinedUserParms()
◆ FindContainer()
| std::string vsp::FindContainer |
( |
const std::string & | name, |
|
|
int | index ) |
|
extern |
Get the ID of a Parm Container with specified name at input index
std::string FindContainer(const std::string &name, int index)
- See also
- FindContainersWithName
- Parameters
-
| [in] | name | string Parm Container name |
| [in] | index | int Parm Container index |
- Returns
- string Parm Container ID
◆ FindContainerGroupNames()
| std::vector< std::string > vsp::FindContainerGroupNames |
( |
const std::string & | parm_container_id | ) |
|
|
extern |
Get an array of Parm group names included in the specified Container
Print( "---> UserParms Container Group IDs: " );
for ( int i = 0; i < int( grp_arr.size() ); i++ )
{
string message = "\t" + grp_arr[i] + "\n";
Print( message );
}
std::vector< std::string > FindContainerGroupNames(const std::string &parm_container_id)
- Parameters
-
| [in] | parm_container_id | string Parm Container ID |
- Returns
- vector<string> Array of Parm group names
◆ FindContainerParmIDs()
| std::vector< std::string > vsp::FindContainerParmIDs |
( |
const std::string & | parm_container_id | ) |
|
|
extern |
Get an array of Parm IDs included in the specified Container
string parm_container_id =
FindContainer( parm_container_name, struct_ind );
for ( uint i = 0; i < uint(parm_ids.length()); i++ )
{
string name_id =
GetParmName( parm_ids[i] ) + string(
": ") + parm_ids[i] + string(
"\n");
Print( name_id );
}
std::string GetFeaStructName(const std::string &geom_id, int fea_struct_ind)
int AddFeaStruct(const std::string &geom_id, bool init_skin=true, int surfindex=0)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
std::vector< std::string > FindContainerParmIDs(const std::string &parm_container_id)
std::string GetParmName(const std::string &parm_id)
- Parameters
-
| [in] | parm_container_id | string Parm Container ID |
- Returns
- vector<string> Array of Parm IDs
◆ FindContainers()
| std::vector< std::string > vsp::FindContainers |
( |
| ) |
|
|
extern |
Get an array of all Parm Container IDs
Print( "---> API Parm Container IDs: " );
for ( int i = 0; i < int( ctr_arr.size() ); i++ )
{
string message = "\t" + ctr_arr[i] + "\n";
Print( message );
}
std::vector< std::string > FindContainers()
- Returns
- vector<string> Array of Parm Container IDs
◆ FindContainersWithName()
| std::vector< std::string > vsp::FindContainersWithName |
( |
const std::string & | name | ) |
|
|
extern |
Get an array of Parm Container IDs for Containers with the specified name
if ( ctr_arr.size() > 0 ) { Print( ( "UserParms Parm Container ID: " + ctr_arr[0] ) ); }
std::vector< std::string > FindContainersWithName(const std::string &name)
- Parameters
-
| [in] | name | string Parm Container name |
- Returns
- vector<string> Array of Parm Container IDs
◆ GetAllUserParms()
| std::vector< std::string > vsp::GetAllUserParms |
( |
| ) |
|
|
extern |
Get the vector of id's for all user parameters
Print( "---> User Parm IDs: " );
for ( int i = 0; i < int( id_arr.size() ); i++ )
{
string message = "\t" + id_arr[i] + "\n";
Print( message );
}
- Returns
- vector <string> Array of user parameter ids
◆ GetContainerName()
| std::string vsp::GetContainerName |
( |
const std::string & | parm_container_id | ) |
|
|
extern |
Get the name of the specified Parm Container
if (
GetContainerName( veh_id ) !=
"Vehicle" ) { Print(
"---> Error: API GetContainerName" ); }
std::string GetContainerName(const std::string &parm_container_id)
- Parameters
-
| [in] | parm_container_id | string Parm Container ID |
- Returns
- string Parm Container name
◆ GetNumPredefinedUserParms()
| int vsp::GetNumPredefinedUserParms |
( |
| ) |
|
|
extern |
Get the number of pre-defined user parameters
- Returns
- int Number of pre-defined user Parms
◆ GetNumUserParms()
| int vsp::GetNumUserParms |
( |
| ) |
|
|
extern |
Get the number of user parameters
- Returns
- int Number of user Parms
◆ GetUserParmContainer()
| std::string vsp::GetUserParmContainer |
( |
| ) |
|
|
extern |
Get the user parm container ID
std::string GetUserParmContainer()
- Returns
- string User parm container ID
◆ GetVehicleID()
| std::string vsp::GetVehicleID |
( |
| ) |
|
|
extern |
Get the ID of the Vehicle Parm Container
std::string GetVehicleID()
- Returns
- string Vehicle ID