Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RSA API vs .STR : slower or faster ?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
guillaumeniel
780 Views, 7 Replies

RSA API vs .STR : slower or faster ?

Hi,

I am working on a cable net structure. I have in my model 529 nodes and 1016 bars. Each bar is a cable element and has a specific cable definition (section and relative dilatation), so I have 1016 different cable sections. 

 

If i use API code to build the RSA model (nodes, elements, sections, supports, prestress load), it is very very long (290 sec. !!). The part which seems to be very long is the cable section definition. It is weird, because if I save the project as a .rtd file, close RSA, and then re-open the .rtd file, the opening is much faster.

 

I tried to create a temporary .str file to do the same, and then import it and delete the file when importation is completed. For the same result, the calculation time falls to 16 sec, which is 20 times faster ! But still too slow. And I would like to avoid using the str format, as it is not improved anymore, and as syntax is different from API.

 

So my question is : is there a way to accelerate my code using only API (set RSA not visible for example), or do I have to keep using a .str temporary file ? And how can I speed my code if I work with the .str file ?

 

Thanks for your help.

7 REPLIES 7
Message 2 of 8

Message 3 of 8

Hi,

I tried to use cache, as follow :

 

Dim cache As RobotStructureCache
cache = Robot.Project.Structure.CreateCache()

 

(...)section definition for Toile1, Toile2, ...

 

For i = 0 To tabElts.GetLength(0) - 1
cache.SetBarLabel(i + 1, IRobotLabelType.I_LT_BAR_CABLE, "Toile " & i + 1)

Next

 

Robot.Project.Structure.ApplyCache(cache)

 

No error message, but it does not work. What's wrong ?

 

 

Message 4 of 8

Sorry, unfortunately applying cable lables by cache does not work so far.

 



Rafal Gaweda
Message 5 of 8

OK, that is too bad...

But is my cript correct for another type of bar ?

 

And will the .str format be still supported by RSA in the future ?

Message 6 of 8


guillaumeniel wrote:

OK, that is too bad...

But is my cript correct for another type of bar ?

 

Seems ok.

Example code:

Dim robot_cache As RobotStructureCache
      robot_cache = robot.Project.Structure.createcache


      For i As int32 = 0 To examplenumber
        robot_cache.AddNode(nodenum, X, Y, Z)
        robot_cache.AddNode(nodenum+1, X1, Y1, Z1)

        robot_cache.AddBar(barnum, nodenum, nodenum + 1, "", "", 0)  'Generate bar in cache
        robot_cache.SetBarLabel(barnum, IRobotLabelType. I_LT_BAR_SECTION, "HEA100")
      Next


      'Create the Robot objects from the cache
      robot.Project.Structure.ApplyCache(robot_cache)

 

 

And will the .str format be still supported by RSA in the future ?

It is \ will be preserved in the state as is now.

 



Rafal Gaweda
Message 7 of 8

OK, Thanks

Message 8 of 8

cache for cables corrected for this syntax:

 

rc.AddBar barnumber, node1, node2, "Cable_1", "STEEL"

 

in SP4 for Robot 2013



Rafal Gaweda

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report