Every Parm in OpenVSP can be accessed and modified through the functions defined in this API group. Every Parm has an associated ParmContainer.
Click here to return to the main page.
More...
|
bool | ValidParm (const string &in id) |
|
double | SetParmVal (const string &in parm_id, double val) |
|
double | SetParmValLimits (const string &in parm_id, double val, double lower_limit, double upper_limit) |
|
double | SetParmValUpdate (const string &in parm_id, double val) |
|
double | SetParmVal (const string &in geom_id, const string &in name, const string &in group, double val) |
|
double | SetParmValUpdate (const string &in geom_id, const string &in parm_name, const string &in parm_group_name, double val) |
|
double | GetParmVal (const string &in parm_id) |
|
double | GetParmVal (const string &in geom_id, const string &in name, const string &in group) |
|
int | GetIntParmVal (const string &in parm_id) |
|
bool | GetBoolParmVal (const string &in parm_id) |
|
void | SetParmUpperLimit (const string &in parm_id, double val) |
|
double | GetParmUpperLimit (const string &in parm_id) |
|
void | SetParmLowerLimit (const string &in parm_id, double val) |
|
double | GetParmLowerLimit (const string &in parm_id) |
|
int | GetParmType (const string &in parm_id) |
|
string | GetParmName (const string &in parm_id) |
|
string | GetParmGroupName (const string &in parm_id) |
|
string | GetParmDisplayGroupName (const string &in parm_id) |
|
string | GetParmContainer (const string &in parm_id) |
|
void | SetParmDescript (const string &in parm_id, const string &in desc) |
|
string | FindParm (const string &in parm_container_id, const string &in parm_name, const string &in group_name) |
|
string | GetParm (const string &in geom_id, const string &in name, const string &in group) |
|
◆ FindParm()
Find a Parm ID given the Parm Container ID, Parm name, and Parm group
string wing_id =
AddGeom(
"WING" );
string sym_id =
FindParm( wing_id,
"Sym_Planar_Flag",
"Sym");
- Parameters
-
[in] | parm_container_id | Parm Container ID |
[in] | parm_name | Parm name |
[in] | group_name | Parm group name |
- Returns
- Parm ID
◆ GetBoolParmVal()
bool GetBoolParmVal |
( |
const string &in |
parm_id | ) |
|
Get the value of the specified bool type Parm
string prop_id =
AddGeom(
"PROP" );
string rev_flag_id =
GetParm( prop_id,
"ReverseFlag",
"Design" );
- Parameters
-
- Returns
- Parm value
◆ GetIntParmVal()
int GetIntParmVal |
( |
const string &in |
parm_id | ) |
|
Get the value of the specified int type Parm
string prop_id =
AddGeom(
"PROP" );
string num_blade_id =
GetParm( prop_id,
"NumBlade",
"Design" );
- Parameters
-
- Returns
- Parm value
◆ GetParm()
Get Parm ID
string lenid =
GetParm( pid,
"Length",
"Design" );
- Parameters
-
[in] | geom_id | Geom ID |
[in] | name | Parm name |
[in] | group | Parm group name |
- Returns
- Array of Parm ID
◆ GetParmContainer()
Get Parm Container ID for the specified Parm
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( cid.size() == 0 ) {
Print(
"---> Error: API GetParmContainer " ); }
- Parameters
-
- Returns
- Parm Container ID
◆ GetParmDisplayGroupName()
Get the display group name for the specified Parm
Print(
"Parm Group Display Names and IDs in Vehicle Parm Container: " );
for ( uint i = 0; i < uint(parm_ids.length()); i++ )
{
}
- Parameters
-
- Returns
- Parm display group name
◆ GetParmGroupName()
Get the group name for the specified Parm
Print(
"Parm Groups and IDs in Vehicle Parm Container: " );
for ( uint i = 0; i < uint(parm_ids.length()); i++ )
{
}
- Parameters
-
- Returns
- Parm group name
◆ GetParmLowerLimit()
double GetParmLowerLimit |
( |
const string &in |
parm_id | ) |
|
Get the lower limit value for the specified Parm
string prop_id =
AddGeom(
"PROP" );
string num_blade_id =
GetParm( prop_id,
"NumBlade",
"Design" );
- Parameters
-
- Returns
- Parm lower limit
◆ GetParmName()
Get the name for the specified Parm
string parm_container_id =
FindContainer( parm_container_name, struct_ind );
for ( uint i = 0; i < uint(parm_ids.length()); i++ )
{
}
- Parameters
-
- Returns
- Parm name
◆ GetParmType()
int GetParmType |
( |
const string &in |
parm_id | ) |
|
Get the data type for the specified Parm
string fuseid =
AddGeom(
"FUSELAGE",
"" );
- See also
- PARM_TYPE
- Parameters
-
- Returns
- Parm data type enum (i.e. PARM_BOOL_TYPE)
◆ GetParmUpperLimit()
double GetParmUpperLimit |
( |
const string &in |
parm_id | ) |
|
Get the upper limit value for the specified Parm
string prop_id =
AddGeom(
"PROP" );
string num_blade_id =
GetParm( prop_id,
"NumBlade",
"Design" );
- Parameters
-
- Returns
- Parm upper limit
◆ GetParmVal() [1/2]
double GetParmVal |
( |
const string &in |
geom_id, |
|
|
const string &in |
name, |
|
|
const string &in |
group |
|
) |
| |
Get the value of the specified double type Parm. This function includes a call to GetParm to identify the Parm ID given the Geom ID, Parm name, and Parm group. The data type of the Parm value will be cast to a double.
double length =
GetParmVal( pod_id,
"Length",
"Design" );
- Parameters
-
[in] | geom_id | Geom ID |
[in] | name | Parm name |
[in] | group | Parm group name |
- Returns
- Parm value
◆ GetParmVal() [2/2]
double GetParmVal |
( |
const string &in |
parm_id | ) |
|
Get the value of the specified Parm. The data type of the Parm value will be cast to a double
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( abs(
GetParmVal( wid ) - 23 ) > 1e-6 ) {
Print(
"---> Error: API Parm Val Set/Get " ); }
- Parameters
-
- Returns
- Parm value
◆ SetParmDescript()
void SetParmDescript |
( |
const string &in |
parm_id, |
|
|
const string &in |
desc |
|
) |
| |
Set the description of the specified Parm
- Parameters
-
[in] | parm_id | Parm ID |
[in] | desc | Parm description |
◆ SetParmLowerLimit()
void SetParmLowerLimit |
( |
const string &in |
parm_id, |
|
|
double |
val |
|
) |
| |
Set the lower limit value for the specified Parm
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( abs(
GetParmVal( wid ) - 15 ) > 1e-6 ) {
Print(
"---> Error: API SetParmLowerLimit " ); }
- See also
- SetParmValLimits
- Parameters
-
[in] | parm_id | Parm ID |
[in] | val | Parm lower limit |
◆ SetParmUpperLimit()
void SetParmUpperLimit |
( |
const string &in |
parm_id, |
|
|
double |
val |
|
) |
| |
Set the upper limit value for the specified Parm
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( abs(
GetParmVal( wid ) - 13 ) > 1e-6 ) {
Print(
"---> Error: API SetParmUpperLimit " ); }
- See also
- SetParmValLimits
- Parameters
-
[in] | parm_id | Parm ID |
[in] | val | Parm upper limit |
◆ SetParmVal() [1/2]
double SetParmVal |
( |
const string &in |
geom_id, |
|
|
const string &in |
name, |
|
|
const string &in |
group, |
|
|
double |
val |
|
) |
| |
Set the value of the specified Parm. This function includes a call to GetParm to identify the Parm ID given the Geom ID, Parm name, and Parm group.
string wing_id =
AddGeom(
"WING" );
SetParmVal( wing_id,
"ThickChord",
"XSecCurve_0", 0.2 );
- See also
- SetParmValUpdate
- Parameters
-
[in] | geom_id | Geom ID |
[in] | name | Parm name |
[in] | group | Parm group name |
[in] | val | Parm value to set |
- Returns
- Value that the Parm was set to
◆ SetParmVal() [2/2]
double SetParmVal |
( |
const string &in |
parm_id, |
|
|
double |
val |
|
) |
| |
Set the value of the specified Parm.
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( abs(
GetParmVal( wid ) - 23 ) > 1e-6 ) {
Print(
"---> Error: API Parm Val Set/Get " ); }
- See also
- SetParmValUpdate
- Parameters
-
[in] | parm_id | Parm ID |
[in] | val | Parm value to set |
- Returns
- Value that the Parm was set to
◆ SetParmValLimits()
double SetParmValLimits |
( |
const string &in |
parm_id, |
|
|
double |
val, |
|
|
double |
lower_limit, |
|
|
double |
upper_limit |
|
) |
| |
Set the value along with the upper and lower limits of the specified Parm
- See also
- SetParmLowerLimit, SetParmUpperLimit
- Parameters
-
[in] | parm_id | Parm ID |
[in] | val | Parm value to set |
[in] | lower_limit | Parm lower limit |
[in] | upper_limit | Parm upper limit |
- Returns
- Value that the Parm was set to
◆ SetParmValUpdate() [1/2]
double SetParmValUpdate |
( |
const string &in |
geom_id, |
|
|
const string &in |
parm_name, |
|
|
const string &in |
parm_group_name, |
|
|
double |
val |
|
) |
| |
Set the value of the specified Parm and force an Update. This function includes a call to GetParm to identify the Parm ID given the Geom ID, Parm name, and Parm group.
- See also
- SetParmVal
- Parameters
-
[in] | geom_id | Geom ID |
[in] | parm_name | Parm name |
[in] | parm_group_name | Parm group name |
[in] | val | Parm value to set |
- Returns
- Value that the Parm was set to
◆ SetParmValUpdate() [2/2]
double SetParmValUpdate |
( |
const string &in |
parm_id, |
|
|
double |
val |
|
) |
| |
Set the value of the specified Parm and force an Update.
string parm_id =
GetParm( pod_id,
"X_Rel_Location",
"XForm" );
- See also
- SetParmVal
- Parameters
-
[in] | parm_id | Parm ID |
[in] | val | Parm value to set |
- Returns
- Value that the Parm was set to
◆ ValidParm()
bool ValidParm |
( |
const string &in |
id | ) |
|
Check if given Parm is valid
string lenid =
GetParm( pid,
"Length",
"Design" );
- Parameters
-
- Returns
- True if Parm ID is valid, false otherwise
bool ValidParm(const string &in id)
string GetXSecParm(const string &in xsec_id, const string &in name)
double GetParmUpperLimit(const string &in parm_id)
string GetParm(const string &in geom_id, const string &in name, const string &in group)
string[] FindContainerParmIDs(const string &in parm_container_id)
string GetParmDisplayGroupName(const string &in parm_id)
string AddParm(int type, const string &in name, const string &in group)
double GetParmVal(const string &in parm_id)
string GetParmName(const string &in parm_id)
string FindParm(const string &in parm_container_id, const string &in parm_name, const string &in group_name)
string GetFeaStructName(const string &in geom_id, int fea_struct_ind)
string GetParmGroupName(const string &in parm_id)
double SetParmVal(const string &in parm_id, double val)
double SetParmValUpdate(const string &in parm_id, double val)
void SetParmUpperLimit(const string &in parm_id, double val)
int GetParmType(const string &in parm_id)
double GetParmLowerLimit(const string &in parm_id)
AngelScript ScriptExtension for representing the C++ std::string.
string FindContainer(const string &in name, int index)
void SetParmDescript(const string &in parm_id, const string &in desc)
double SetParmValLimits(const string &in parm_id, double val, double lower_limit, double upper_limit)
void ChangeXSecShape(const string &in xsec_surf_id, int xsec_index, int type)
AngelScript ScriptExtension for representing the C++ std::vector.
string GetXSecSurf(const string &in geom_id, int index)
string AddGeom(const string &in type, const string &in parent=string())
void Print(const string &in data, bool new_line=true)
string GetParmContainer(const string &in parm_id)
bool GetBoolParmVal(const string &in parm_id)
void SetParmLowerLimit(const string &in parm_id, double val)
int GetNumXSec(const string &in xsec_surf_id)
int GetIntParmVal(const string &in parm_id)
int AddFeaStruct(const string &in geom_id, bool init_skin=true, int surfindex=0)