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

    Autodesk Robot Structural Analysis

    Reply
    Active Contributor
    RRufino
    Posts: 43
    Registered: ‎07-22-2011
    Accepted Solution

    API Help - Bar lenght and Other

    219 Views, 18 Replies
    10-18-2012 04:28 AM

    Hi all,

     

    I was trying to adapt some macros that some users gently post here on Discussion Groups.

     

    I already made a part of what i wanted...but this is the first time i'm trying to use macros, so i'm not being able to do the rest.

     

    I have already a way to have all forces on my xls file, but i want to get in the following columns Lenght(m) | Section | Rect_BF | Rect_HT | Rect_EP | Bar Name | Deflection (mm)

     

    How can i do this? Can you help me?

     

    Thanks, please see attachement

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

    Re: API Help - Bar lenght and Other

    10-18-2012 04:39 AM in reply to: RRufino

    Example code:

    The sectional data \ interface \ access depends of section type: from database or user or tappered or complex ....

    What sections do you have?

     

    Dim RobApp As New RobotApplication
    Dim Bar As IRobotBar
    Dim Sel As IRobotSelection
    Dim Sec As RobotBarSection
    Dim BarCol As RobotBarCollection
    Dim sectData As IRobotBarSectionData
    
    
    
    Set Sel = RobApp.Project.Structure.Selections.Get(I_OT_BAR)
    Set BarCol = RobApp.Project.Structure.Bars.GetMany(Sel)
    
    For i = 1 To BarCol.Count
        
        Set Bar = BarCol.Get(i)
        Set sectLab = Bar.GetLabel(I_LT_BAR_SECTION)
        Set sectData = sectLab.Data
    
        Set Sec = Bar.GetLabel(I_LT_BAR_SECTION)
    
    
        Cells((7 + i), 1) = Bar.Number
        Cells((7 + i), 2) = Bar.Length
        Cells((7 + i), 3) = Sec.Name
        Cells((7 + i), 4) = sectData.GetValue(I_BSDV_AX) ' A of section
        Cells((7 + i), 5) = sectData.GetValue(I_BSDV_D) ' h of section
     
    Next i
    
    Exit Sub
    

     

     



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    RRufino
    Posts: 43
    Registered: ‎07-22-2011

    Re: API Help - Bar lenght and Other

    10-18-2012 04:57 AM in reply to: RG_Adsk

    I have regular Rc Beams and Rc Columns.


    I tried to copy that code to "my" macros but it simply not work...where should i paste that?


    Thanks in advance

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

    Re: API Help - Bar lenght and Other

    10-18-2012 05:01 AM in reply to: RRufino

    I have regular Rc Beams and Rc Columns.

     

    OK , I will show you.


    I tried to copy that code to "my" macros but it simply not work...where should i paste that?

     

    It was example for steel sections - copy it to separate xls file



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    RRufino
    Posts: 43
    Registered: ‎07-22-2011

    Re: API Help - Bar lenght and Other

    10-18-2012 05:48 AM in reply to: RG_Adsk

    OK , I will show you.

     

    Thanks Rafal, if you don't mind please check the attachement on my first post.

     

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

    Re: API Help - Bar lenght and Other

    10-19-2012 01:25 AM in reply to: RRufino

    Take a look at attached xls



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    RRufino
    Posts: 43
    Registered: ‎07-22-2011

    Re: API Help - Bar lenght and Other

    10-19-2012 02:22 AM in reply to: RRufino

    Dear Rafal, i don't know how to thank you!
    Thank you so much!

    Greetings from Portugal!

     

    1000 kudos for you!

    Please use plain text.
    Contributor
    Posts: 24
    Registered: ‎01-07-2009

    Re: API Help - Bar lenght and Other

    10-19-2012 02:47 AM in reply to: RRufino

    Hi Rafal,

     

    I'm seeing that this macro is for 2 or more points in a bar.

     

    What should i do to extract data only for 1 point? 

     

    For example:

     

    I want data (forces, section propreties, etc...) for the point x=0 of the bar.

     

    Thanks in advance,

     

    Cheers!

    Please use plain text.
    Distinguished Contributor
    athurD
    Posts: 140
    Registered: ‎12-14-2011

    Re: API Help - Bar lenght and Other

    10-19-2012 03:39 AM in reply to: FilRib

    hi.

    File excel erro ???????

    2012-10-19_1736.png

    Please use plain text.
    Contributor
    Posts: 24
    Registered: ‎01-07-2009

    Re: API Help - Bar lenght and Other

    10-19-2012 03:42 AM in reply to: athurD

    Where is the error?

    Please use plain text.