(API) Macro with Robot

(API) Macro with Robot

Anonymous
Not applicable
1,381 Views
5 Replies
Message 1 of 6

(API) Macro with Robot

Anonymous
Not applicable

Hello,

 

I'm trying to write a macro which enables me to extract envelope values of ELU and ELS cases of columns and walls which are supported in order to calculate foundations with the NF P94-261. 

 

I've seen a lot of macros on this forum and I tried to adapt them to my mine. But I think my problems to extract data from Robot are due to declarations of values on my macro. I would like to know if there a documentation of this API? I work with RSA 2015.

 

Thank you,

 

0 Likes
1,382 Views
5 Replies
Replies (5)
Message 2 of 6

Rafal.Gaweda
Autodesk Support
Autodesk Support
After installation of SDK, everything can be found in :
C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2015\SDK\


Rafal Gaweda
Message 3 of 6

Anonymous
Not applicable

Hi,

 

Thank you Rafal. I didn't find SDK so I downloaded OleWoo to extract Robot's library.

 

I still have a problem. I want  to get efforts of columns which are supported. I worked on the macro you developped for bars and I tried to adapt it. 

 

Public RobApp As RobotApplication

Public Sub CommandButton2_Click()


Range("A13", "H25000").Clear
Range("B5").Clear
Set RobApp = New RobotApplication


Cells(5, 1) = "Project"
Cells(5, 2) = RobApp.Project.Name

Dim RSelection As RobotSelection
Set RSelection = RobApp.Project.Structure.Selections.Get(I_OST_COLUMN)
Dim BarCol As RobotBarCollection
Set BarCol = RobApp.Project.Structure.Bars.GetMany(RSelection)

 

I replaced I_OT_BARS by I_OST_COLUMN which is an object structural type. But it doesn't select any columns.

I'm wondering if it is a good idea to use bars instead of nodes. In fact, after a selection of all columns I have to distinguish those which are supported.. But if i want to use node's supports to extract efforts of elements how can I make difference between columns ans walls?

 

 

In advance, thank you,

0 Likes
Message 4 of 6

Rafal.Gaweda
Autodesk Support
Autodesk Support
For selections you have to use
....Get(I_OT....)

Other selections you have to build by yourself


Rafal Gaweda
0 Likes
Message 5 of 6

Anonymous
Not applicable

thank you Rafal but i don't understand this answer. In Fact, how can I make difference between beams and bars in BarCollection

0 Likes
Message 6 of 6

Rafal.Gaweda
Autodesk Support
Autodesk Support

Example:

 

    Dim BSel As RobotSelection
    Dim Csel  As RobotSelection
    Dim Bars As RobotBarCollection
    Dim Bar As RobotBar
    Dim ColumnSel As String
    Dim BeamSel As String
    
    Set BSel = robapp.Project.Structure.Selections.Create(I_OT_BAR)
    Set Csel = robapp.Project.Structure.Selections.Create(I_OT_BAR)
    Set Bars = robapp.Project.Structure.Bars.GetAll

For i = 1 To Bars.Count
    Set Bar = Bars.Get(i)
    If Bar.StructuralType = I_OST_BEAM Then
        BeamSel = BeamSel + " " + Str(Bar.Number)
    ElseIf Bar.StructuralType = I_OST_COLUMN Then
        ColumnSel = ColumnSel + " " + Str(Bar.Number)
    End If
Next i

BSel.FromText BeamSel
Csel.FromText ColumnSel


Rafal Gaweda
0 Likes