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: 

Get Alpha cr for combinations with moving loads with API

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Euge_I
427 Views, 5 Replies

Get Alpha cr for combinations with moving loads with API

Dear all: I have two questions related:

1.- Is it possible to get, via API, the value for «alpha cr X» and «alpha cr Y»? They are calculated for each storey but they don't appear in:

   RobApp.Project.Structure.Results.Storeys.Displacements

   RobApp.Project.Structure.Results.Storeys.ReducedForces

   RobApp.Project.Structure.Results.Storeys.Values

2.- if I have a moving load, for each combination I would have several components. Due to this, for each component I should have a value for «alpha cr X» and «alpha cr Y». How can I get them? Is it possible to get via API?

 

Thanks in advance.

5 REPLIES 5
Message 2 of 6
Rafal.Gaweda
in reply to: Euge_I

Hi @Euge_I

 

I am afraid it is not implemented in Robot API.

I am sorry.

 



Rafal Gaweda
Message 3 of 6
Euge_I
in reply to: Rafal.Gaweda

Ok, so I understand there is no possibility to get values of alpha CR via API (whereas ROBOT calculates them).

 

On the other hand, I was asking too that if I have a moving load, for each combination I would have several components, so I should have several values for storey deformation and loads (for each component). How can we get them (via API it is not implemented I suppose, I'm asking if they can be seen in tabular data).

 

Message 4 of 6
Rafal.Gaweda
in reply to: Euge_I

Hi @Euge_I

 

Stories calculations \ results are not available for moving loads and combinations with moving loads.

 



Rafal Gaweda
Message 5 of 6
WALIDGIO
in reply to: Rafal.Gaweda

hello, is there a solution to my code, i want to retrieve the reduce forces FX FY for a specific Load Comb, but i get an error here that i cant figurout

    ' Get the collection including all the stories
    Dim story_col As IRobotCollection
    Set story_col = robapp.Project.Structure.Storeys.GetAll()

 

here the full code 

Sub ExportStoreyResultsToExcel()
    ' Add reference to the active worksheet
    Dim ws As Worksheet
    Set ws = ActiveSheet
    
    ' Declare the main variable representing Robot application and connect it to the currently running program instance.
    Dim robapp As IRobotApplication
    Set robapp = New RobotApplication
    
    ' Declare and initialize the variable representing the storey results server.
    Dim storey_res_serv As IRobotStoreyResultServer
    Set storey_res_serv = robapp.Project.Structure.Results.Storeys
    
    ' Get the collection including all the stories
    Dim story_col As IRobotCollection
    Set story_col = robapp.Project.Structure.Storeys.GetAll()
    
    ' Find the range starting from the named range "force"
    Dim ForceTable As Range
    Set ForceTable = ws.Range("force")
    
    ' Clear existing content in the table range
    ForceTable.CurrentRegion.Clear
    ForceTable.CurrentRegion.ClearContents
    
    ' Write and format header
    With ForceTable.Resize(1, 10)
        .Value = Array("Storey Name", "Case Name", "FX", "FY", "FZ", "DrUX", "DrUY", "ex0", "ey0", "ex1", "ey1")
        .Font.Bold = True
        .Interior.Color = RGB(150, 170, 220) ' Light Blue
        .HorizontalAlignment = xlCenter
        .Borders.LineStyle = xlContinuous
    End With
    
    ' Set starting row for data output
    Dim DataStartRow As Long
    DataStartRow = ForceTable.Row + 1 ' Start below the header
    
    ' Define the case numbers to be extracted
    Dim caseNumbers() As Long
    caseNumbers = Array(4, 5)
    
    ' Iterate for consecutive stories from the collection.
    Dim i As Integer, j As Integer
    For i = 1 To story_col.Count
        ' Get i-th story.
        Dim story As IRobotStorey
        Set story = story_col.Get(i)
        
        ' Read the name of the story.
        Dim story_name As String
        story_name = story.Name
        
        ' Iterate for the specified case numbers
        For j = LBound(caseNumbers) To UBound(caseNumbers)
            Dim cas_num As Long
            cas_num = caseNumbers(j)
            
            ' Get the reduced forces for the specific storey and combination
            Dim red_force As RobotStoreyReducedForces
            Set red_force = storey_res_serv.ReducedForces(story.Number, cas_num)
            
            ' Get the displacements for the specific storey and combination
            Dim disp As RobotStoreyDisplacements
            Set disp = storey_res_serv.Displacements(story.Number, cas_num)
            
            ' Get the story values for the specific storey
            Dim story_values As RobotStoreyValues
            Set story_values = story.Values
            
            ' Write the results to Excel
            With ForceTable.Offset(DataStartRow, 0).Resize(1, 11)
                .Value = Array(story_name, "Case " & cas_num, red_force.FX, red_force.FY, red_force.FZ, _
                               disp.DrUX, disp.DrUY, story_values.Ex0, story_values.Ey0, story_values.Ex1, story_values.Ey1)
                .HorizontalAlignment = xlCenter
                .Borders.LineStyle = xlContinuous
            End With
            
            DataStartRow = DataStartRow + 1 ' Move to the next row
            
            ' Free references.
            Set red_force = Nothing
            Set disp = Nothing
        Next j
        
        ' Free references.
        Set story = Nothing
    Next i
    
    ' Free references
    Set storey_res_serv = Nothing
    Set robapp = Nothing
    Set ws = Nothing
End Sub

 

Message 6 of 6

hi @WALIDGIO 

for greater clarity, please publish new topics rather than using approved thematic content.

https://forums.autodesk.com/t5/robot-structural-analysis-forum/excel-vba-to-retrieve-fx-fy-forces-in...

Best Regards

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report