Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 03:38:14 +0000



Post From: C++, ACSIL functions question

[2023-03-12 11:53:09]
User431178 - Posts: 544
Is there anyway within the function to use the SCSubgraphRef Subgraph_Ref_adx alias instead of the sc.Subgraph[y] nomenclature?

Pass it in as a parameter


void SomeFunc(SCSubgraphRef Subgraph_Ref_adx)
{
....some code
}

or declare within the function


void SomeFunc(SCStudyInterfaceRef sc)
{
SCSubgraphRef Subgraph_Ref_adx = sc.Subgraph[?];

....some code
}

One way or other you need to get the variable(s) you wish to use into the scope of the function.

Here are some links to information that might help.

C++ Functions
ACSIL Programming Concepts: Passing ACSIL Interface Members Structure To Secondary Function

https://en.cppreference.com/w/cpp/language/scope
https://www.tutorialspoint.com/cplusplus/cpp_variable_scope.htm
https://www.geeksforgeeks.org/scope-of-variables-in-c/
Date Time Of Last Edit: 2023-03-12 11:55:02