• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Robot Structural Analysis

    Reply
    Active Contributor
    Posts: 34
    Registered: ‎12-07-2012
    Accepted Solution

    RSA API vs .STR : slower or faster ?

    233 Views, 7 Replies
    01-04-2013 05:12 AM

    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.

    Please use plain text.
    Product Support
    Posts: 2,543
    Registered: ‎04-26-2010

    Re: RSA API vs .STR : slower or faster ?

    01-04-2013 06:00 AM in reply to: guillaumeniel

    have you tried dll? 

     

    http://forums.autodesk.com/t5/Autodesk-Robot-Structural/Creating-DLL-for-API-and-making-it-available...

     

    Do you use cache?

     

    cache.jpg



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    Posts: 34
    Registered: ‎12-07-2012

    Re: RSA API vs .STR : slower or faster ?

    01-04-2013 03:36 PM in reply to: RG_Adsk

    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 ?

     

     

    Please use plain text.
    Product Support
    Posts: 2,543
    Registered: ‎04-26-2010

    Re: RSA API vs .STR : slower or faster ?

    01-07-2013 01:26 AM in reply to: guillaumeniel

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

     



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    Posts: 34
    Registered: ‎12-07-2012

    Re: RSA API vs .STR : slower or faster ?

    01-07-2013 10:19 AM in reply to: RG_Adsk

    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 ?

    Please use plain text.
    Product Support
    Posts: 2,543
    Registered: ‎04-26-2010

    Re: RSA API vs .STR : slower or faster ?

    01-08-2013 12:40 AM in reply to: guillaumeniel

    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
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    Posts: 34
    Registered: ‎12-07-2012

    Re: RSA API vs .STR : slower or faster ?

    01-08-2013 07:49 PM in reply to: RG_Adsk

    OK, Thanks

    Please use plain text.
    Product Support
    Posts: 2,543
    Registered: ‎04-26-2010

    Re: RSA API vs .STR : slower or faster ?

    03-28-2013 03:53 AM in reply to: guillaumeniel

    cache for cables corrected for this syntax:

     

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

     

    in SP4 for Robot 2013



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.