How can I create a structure fo automatically generated variables?

I need to write an API code to create a structural model in SAP2000 . However every frame object is added with a variable name in the example code provided by the Sap2000.
FrameName1 = System.String(' ');
FrameName2 = System.String(' ');
FrameName3 = System.String(' ');
[ret, FrameName1] = FrameObj.AddByCoord(0, 0, 0, 0, 0, 10, FrameName1, 'R1', '1', 'Global');
[ret, FrameName2] = FrameObj.AddByCoord(0, 0, 10, 8, 0, 16, FrameName2, 'R1', '2', 'Global');
[ret, FrameName3] = FrameObj.AddByCoord(-4, 0, 10, 0, 0, 10, FrameName3, 'R1', '3', 'Global');
Since I have dozens of frames that are needed to be defined I need to do this in a loop. How can I handle this? I read in other topics that to generate automatic variable within a loop is strongly not suggested. I have the coordinates as an array so somehow I shoul be able to create a variable structure so that the API will see the the elements of my structure as different variables. Since I am not very experienced on API codes, sorry in advance if I am asking something nonsense. Thanky you

Answers (0)

Categories

Find more on Audio Toolbox in Help Center and File Exchange

Asked:

on 13 Jul 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!