Forum Discussion
There are project Variables (acccessed by Project.Variables.<variable name>) that are global throughout the specific project. You could also create a variable on the Project Suite level (ProjectSuite.Variables.<variable name>) that would span all projects within the project suite. Either is a built in way of having a global variable that is not language specific nor do you need to worry about any include statements or nested code.
- tristaanogre6 years agoEsteemed Contributor
You could also use the mechanic in JavaScript of module.export and requires to add variables and objects to other code units.
- jpatterson6 years agoNew Contributor
I was overthinking the solution. Using shared exported variables I was able to incriment the shared variable in a local script (which changed the variable value at the project level), which is exactly what i was looking for. Thanks again!
- jpatterson6 years agoNew Contributor
Thank you for your quick response! I was looking into those, but I didn't see a good built in way to incriment a global variable. The best approch that I could come up with was creating a global variable that is incrimented through a shared javascript closure function. This seems to be a bit extravaigent for a simple global counter. The global variables have plenty of "get" methods but no clear "set" methods. Am I overlooking something?
Related Content
- 11 years ago
- 12 years ago
- 11 years ago
Recent Discussions
- 52 minutes ago
- 7 hours ago
- 2 days ago