-
variable to return string with ascending values (set01, set02, etc.)
Hi all – I’m not sure if I’m even asking the question right, but here’s my issue…
I have a txt file outside of AE that has a collection of arrays in it, which are named and numbered. It looks something like this:
set01 = [4336,43.59,-103.42,0,1208.84,0,0,19,11,04,100,10,0,0,30,10,0,0,0,0]
set02 = [4726,40.11,-75.44,400,0,135,2.5,19,11,04,100,10,0,0,0,5,40,5,0,0]
set03 = [4733,37.45,-113.17,0,1900….etc. etc. etc.For each array, I would like to have one null layer with a bunch of slider controls on it, with each slider control calling a value from the array. I have some code that works in the box below, but I would much rather write a variable that would return the text “set01” rather than having to change the last line of code for every null object (there are quite a few arrays). I would like the number to be based on the layer index, so that I can simply set up one layer with the right expression on the slider controls, and copy it a bunch of times. It seems like there should be a way to do this… am I wrong?
myPath = "/Macintosh HD/Users/render/Desktop/SR/Data Mapping Stuff/ecoDataCollection.txt";
$.evalFile(myPath);
arrayValue = thisProperty.propertyGroup(1).propertyIndex-1;
set01[arrayValue]