We would like to be able to share variables lists from all levels without having to share project files or add them all in manually. If I export my project variables, then my colleagues should be...
Import/Export variable lists
cunderw
9 years agoCommunity Hero
It would be very simple to also write a script that will do this.
You can loop through the number of variables you have and output their name, type and value into a file, then read them back in another project to add them.
Very rough psuedo code.
function outputVars() { var count = Project.Variables.VariableCount; var name, type,value; for(var i = 0; i < count; i++){ name = Project.Variables.GetVariableName(i); value = Project.Variables.VariableByName(name); type = Project.Variables.GetVariableType(Project.Variables.VariableByName(name)) //code to write to file } } function insertVars() { //code to open file for(lines in file) { if(!Project.Variables.VariableExists(varNameFromFile){ //add var and type } //set var value etc.. } }
Related Content
- 3 years ago
- 11 years ago