The following group of API functions deals with set manipulation.
Click here to return to the main page.
More...
◆ CopyPasteSet()
void CopyPasteSet |
( |
int |
copyIndex, |
|
|
int |
pasteIndex |
|
) |
| |
Copies all the states of a geom set and pastes them into a specific set based on passed in indexs
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( flag_value !=
true) {
Print(
"---> Error: API CopyPasteSet " ); }
- Parameters
-
[in] | copy_Index | Copy Index |
[in] | paste_Index | Paste Index |
◆ GetGeomSet()
Get an array of Geom IDs for the specified set name
if ( geom_arr1.size() != geom_arr2.size() ) {
Print(
"---> Error: API GetGeomSet " ); }
- Parameters
-
[in] | name | const string set name |
- Returns
- array<string> array of Geom IDs
◆ GetGeomSetAtIndex()
string [] GetGeomSetAtIndex |
( |
int |
index | ) |
|
Get an array of Geom IDs for the specified set index
if ( geom_arr1.size() != geom_arr2.size() ) {
Print(
"---> Error: API GetGeomSet " ); }
- See also
- SET_TYPE
- Parameters
-
- Returns
- Array of Geom IDs
◆ GetNumSets()
Get the total number of defined sets. Named sets are used to group compenents and read/write on them. The number of named sets will be 10 for OpenVSP versions up to 3.17.1 and 20 for later versions.
- Returns
- Number of sets
◆ GetSetFlag()
bool GetSetFlag |
( |
const string &in |
geom_id, |
|
|
int |
set_index |
|
) |
| |
Check if a Geom is in the set at the specified set index
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( !
GetSetFlag( fuseid, 3 ) ) {
Print(
"---> Error: API Set/Get Set Flag " ); }
- Parameters
-
[in] | geom_id | Geom ID |
[in] | set_index | Set index |
- Returns
- True if geom is in the set, false otherwise
◆ GetSetIndex()
int GetSetIndex |
( |
const string &in |
name | ) |
|
Get the set index for the specified set name
- Parameters
-
- Returns
- Set index
◆ GetSetName()
string GetSetName |
( |
int |
index | ) |
|
Get the name of a set at specified index
if (
GetSetName( 3 ) !=
"SetFromScript" ) {
Print(
"---> Error: API Get/Set Set Name " ); }
- See also
- SET_TYPE
- Parameters
-
- Returns
- Set name
◆ SetSetFlag()
void SetSetFlag |
( |
const string &in |
geom_id, |
|
|
int |
set_index, |
|
|
bool |
flag |
|
) |
| |
Set whether or not a Geom is a member of the set at specified set index
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( !
GetSetFlag( fuseid, 3 ) ) {
Print(
"---> Error: API Set/Get Set Flag " ); }
- Parameters
-
[in] | geom_id | Geom ID |
[in] | set_index | Set index |
[in] | flag | Flag that indicates set membership |
◆ SetSetName()
void SetSetName |
( |
int |
index, |
|
|
const string &in |
name |
|
) |
| |
Set the name of a set at specified index
if (
GetSetName( 3 ) !=
"SetFromScript" ) {
Print(
"---> Error: API Get/Set Set Name " ); }
- See also
- SET_TYPE
- Parameters
-
[in] | index | Set index |
[in] | name | Set name |