MrDysprosium
7 years agoContributor
How to access the value of a Project Variable programmatically?
Trying to get an idea for how I can interact with Project Variables. Here is a test script I setup:
def TestVars(): ProjectSuite.Variables.AddVariable("testVar", "Integer") ProjectSuite.Variables.VariableByName["testVar"] = 1234 Log.Error(str(ProjectSuite.Variables.VariableByName("testVar")))
I have a couple of questions.
The above code creates a "Persistent" variable, how do I programmatically create a "Temporary" one?
Secondly, this script fails on the fourth line with the following error.
Type Error `IDispatchIndexedPropertWrapper` object is not callable
Any ideas? I want to be able to create and edit and call the value of project variables all within a script.