The following functions are available for the Advanced Link tool.
Click here to return to the main page.
More...
|
string[] | GetAdvLinkNames () |
|
int | GetLinkIndex (const string &in name) |
|
void | DelAdvLink (int index) |
|
void | DelAllAdvLinks () |
|
void | AddAdvLink (const string &in name) |
|
void | AddAdvLinkInput (int index, const string &in parm_id, const string &in var_name) |
|
void | AddAdvLinkOutput (int index, const string &in parm_id, const string &in var_name) |
|
void | DelAdvLinkInput (int index, const string &in var_name) |
|
void | DelAdvLinkOutput (int index, const string &in var_name) |
|
string[] | GetAdvLinkInputNames (int index) |
|
string[] | GetAdvLinkInputParms (int index) |
|
string[] | GetAdvLinkOutputNames (int index) |
|
string[] | GetAdvLinkOutputParms (int index) |
|
bool | ValidateAdvLinkParms (int index) |
|
void | SetAdvLinkCode (int index, const string &in code) |
|
string | GetAdvLinkCode (int index) |
|
void | SearchReplaceAdvLinkCode (int index, const string &in from, const string &in to) |
|
bool | BuildAdvLinkScript (int index) |
|
void | SetVar (const string &in var_name, double val) |
|
double | GetVar (const string &in var_name) |
|
◆ AddAdvLink()
void AddAdvLink |
( |
const string &in |
name | ) |
|
Add an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | string | Name for advanced link |
◆ AddAdvLinkInput()
void AddAdvLinkInput |
( |
int |
index, |
|
|
const string &in |
parm_id, |
|
|
const string &in |
var_name |
|
) |
| |
Add an input variable to an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | int | Advanced link index |
[in] | string | parm_id for advanced link input variable |
[in] | string | name for advanced link input variable |
◆ AddAdvLinkOutput()
void AddAdvLinkOutput |
( |
int |
index, |
|
|
const string &in |
parm_id, |
|
|
const string &in |
var_name |
|
) |
| |
Add an output variable to an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | int | Advanced link index |
[in] | string | parm_id for advanced link output variable |
[in] | string | name for advanced link output variable |
◆ BuildAdvLinkScript()
bool BuildAdvLinkScript |
( |
int |
index | ) |
|
Build (ready for execution and perform syntax check) an advanced link.
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
if ( success )
{
Print(
"Advanced link build successful." );
}
else
{
Print(
"Advanced link build not successful." );
}
- Parameters
-
[in] | index | Index for advanced link |
- Returns
- Flag indicating whether advanced link build was successful
◆ DelAdvLink()
void DelAdvLink |
( |
int |
index | ) |
|
Delete an advanced link specified by index
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
for( int n = 0 ; n < int( link_array.length() ) ; n++ )
{
}
- Parameters
-
[in] | index | Index for advanced link |
◆ DelAdvLinkInput()
void DelAdvLinkInput |
( |
int |
index, |
|
|
const string &in |
var_name |
|
) |
| |
Delete an input variable from an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
string y_pos =
GetParm( pod,
"Y_Rel_Location",
"XForm" );
- Parameters
-
[in] | int | Advanced link index |
[in] | string | name for advanced link input variable to delete |
◆ DelAdvLinkOutput()
void DelAdvLinkOutput |
( |
int |
index, |
|
|
const string &in |
var_name |
|
) |
| |
Delete an output variable from an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
string y_pos =
GetParm( pod,
"Y_Rel_Location",
"XForm" );
- Parameters
-
[in] | int | Advanced link index |
[in] | string | name for advanced link output variable to delete |
◆ DelAllAdvLinks()
Delete all advanced links
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
for( int n = 0 ; n < int( link_array.length() ) ; n++ )
{
}
◆ GetAdvLinkCode()
string GetAdvLinkCode |
( |
int |
index | ) |
|
Get the code from an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | index | Index for advanced link |
- Returns
- String containing advanced link code
◆ GetAdvLinkInputNames()
string [] GetAdvLinkInputNames |
( |
int |
index | ) |
|
Get the name of all the inputs to a specified advanced link index
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
for( int n = 0 ; n < int( name_array.length() ) ; n++ )
{
}
- Parameters
-
[in] | index | Advanced link index |
- Returns
- Array of advanced link input names
◆ GetAdvLinkInputParms()
string [] GetAdvLinkInputParms |
( |
int |
index | ) |
|
Get the Parm IDs of all the inputs to a specified advanced link index
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
for( int n = 0 ; n < int( parm_array.length() ) ; n++ )
{
}
- Parameters
-
[in] | index | Advanced link index |
- Returns
- Array of advanced link input Parm IDs
◆ GetAdvLinkNames()
Get an array of all advanced link names
for( int n = 0 ; n < int( link_array.length() ) ; n++ )
{
}
- Returns
- Array of advanced link names
◆ GetAdvLinkOutputNames()
string [] GetAdvLinkOutputNames |
( |
int |
index | ) |
|
Get the Parm IDs of all the outputs to a specified advanced link index
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
for( int n = 0 ; n < int( name_array.length() ) ; n++ )
{
}
- Parameters
-
[in] | index | Advanced link index |
- Returns
- Array of advanced link output names
◆ GetAdvLinkOutputParms()
string [] GetAdvLinkOutputParms |
( |
int |
index | ) |
|
Get the Parm IDs of all the outputs to a specified advanced link index
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
for( int n = 0 ; n < int( parm_array.length() ) ; n++ )
{
}
- Parameters
-
[in] | index | Advanced link index |
- Returns
- Array of advanced link output Parm IDs
◆ GetLinkIndex()
int GetLinkIndex |
( |
const string &in |
name | ) |
|
Find the index of a specific advanced link.
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | string | Name for advanced link |
- Returns
- index for advanced link
◆ GetVar()
double GetVar |
( |
const string &in |
var_name | ) |
|
This function is used internally by OpenVSP to get an output variable's value from an advanced link script after it completes. This function should never be called by a user.
This function is only available in AngelScript and is not a part of the general API.
- Parameters
-
[in] | var_name | Advanced Link variable name |
- Returns
- Value for the variable
◆ SearchReplaceAdvLinkCode()
void SearchReplaceAdvLinkCode |
( |
int |
index, |
|
|
const string &in |
from, |
|
|
const string &in |
to |
|
) |
| |
Search and replace strings in the advanced link code
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | index | Index for advanced link |
[in] | string | Code for advanced link |
◆ SetAdvLinkCode()
void SetAdvLinkCode |
( |
int |
index, |
|
|
const string &in |
code |
|
) |
| |
Get the code from an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
- Parameters
-
[in] | index | Index for advanced link |
[in] | string | Code for advanced link |
◆ SetVar()
void SetVar |
( |
const string &in |
var_name, |
|
|
double |
val |
|
) |
| |
This function is used internally by OpenVSP to pass an input variable's value into an advanced link script before it runs. This function should never be called by a user.
This function is only available in AngelScript and is not a part of the general API.
- Parameters
-
[in] | var_name | Advanced Link variable name |
[in] | val | Value for the variable |
◆ ValidateAdvLinkParms()
bool ValidateAdvLinkParms |
( |
int |
index | ) |
|
Validate the input and output parameters for an advanced link
string length =
FindParm( pod,
"Length",
"Design" );
string x_pos =
GetParm( pod,
"X_Rel_Location",
"XForm" );
if ( valid )
{
Print(
"Advanced link Parms are valid." );
}
else
{
Print(
"Advanced link Parms are not valid." );
}
- Parameters
-
[in] | index | Index for advanced link |
- Returns
- Flag indicating whether parms are valid
void DelAdvLink(int index)
string[] GetAdvLinkInputNames(int index)
void DelAdvLinkOutput(int index, const string &in var_name)
string GetAdvLinkCode(int index)
bool ValidateAdvLinkParms(int index)
void AddAdvLinkOutput(int index, const string &in parm_id, const string &in var_name)
bool BuildAdvLinkScript(int index)
string FindParm(const string &in parm_container_id, const string &in parm_name, const string &in group_name)
string[] GetAdvLinkOutputParms(int index)
void SearchReplaceAdvLinkCode(int index, const string &in from, const string &in to)
void DelAdvLinkInput(int index, const string &in var_name)
void AddAdvLink(const string &in name)
AngelScript ScriptExtension for representing the C++ std::vector.
string[] GetAdvLinkInputParms(int index)
string AddGeom(const string &in type, const string &in parent=string())
void Print(const string &in data, bool new_line=true)
string GetParm(const string &in container_id, const string &in name, const string &in group)
string[] GetAdvLinkOutputNames(int index)
void AddAdvLinkInput(int index, const string &in parm_id, const string &in var_name)
string[] GetAdvLinkNames()
void SetAdvLinkCode(int index, const string &in code)
int GetLinkIndex(const string &in name)