HELLO,
please, I would like to know the steps to do to declare a global variable in the definition document ?
and after use FCTools.ScriptContext.Project.EnvironmentVariables.Get("variable"), and set to update the value.
thank you.
HELLO,
please, I would like to know the steps to do to declare a global variable in the definition document ?
and after use FCTools.ScriptContext.Project.EnvironmentVariables.Get("variable"), and set to update the value.
thank you.
0 out of 0 found this helpful
Comments
1 comment
The Environment Variables that you are referencing in code are located in the project properties in Project Setup, not in the document definition. You cannot update the value through a script / code. Assuming you are on FC 12 -
With your project open, go to Project > Project Properties.
Select the "Environment Variables" tab.
Click "New"
Change the "Type" to String
Enter a Name and a Value.
Click OK
You reference the values of the variable in scripts as you have already indicated (C#):
string variableValue = FCTools.ScriptContext.Project.EnvironmentVariables.Get("variable");
Please sign in to leave a comment.