Message 1 of 1
How can I use a string to call a matrix with the same name?

Not applicable
01-23-2020
02:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using the manage function in iLogic and want to be able to run it through a for loop. The problem is, it takes the string name as it is for the position instead of using the corresponding matrix value declared earlier.
I read about using 'Eval' in VB, but I don't think that works in iLogic.
Basically.
Create oArray as Arraylist oArray.Add(1)
oArray.Add(2)
oArray.Add(3)
define positions as geometry points pos1=... pos2=... pos3=… ThisAssembly.BeginManage("Group1") For Each element In oArray opart = "Part" & element oCC = "Part:" & element
Dim opart = Components.Add(oCC, oPath, position := ("pos" & element), grounded := False)
Next ThisAssembly.EndManage("Group1")
I can't get ("pos" & element) and return the matrix point value.
I used 1,2,3 for example, but they are not sequential numbers in real life, hence making the arraylist.
How do I do this?
Thanks