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: 

Export results ARSA via API

74 REPLIES 74
SOLVED
Reply
Message 1 of 75
mateaus
6270 Views, 74 Replies

Export results ARSA via API

Hi,

 

I would like to export the results of efforts with VBA in excel files like in the video attached.

 

Can you help me ?

 

Export result

74 REPLIES 74
Message 41 of 75
mateaus
in reply to: Rafal.Gaweda


@Anonymous_Adsk wrote:

for selection of fes and nodes attached

 


Hi it doesn't work I think. Can we enter a list of nodes in a excel cell and have the results of the selection ?


No it works on nodes selection and FEs selection made in Robot


I tried to modify the macro to be able to enter the number of selection in cell(9.2) but it doesn't work.

 

My goal is not have to interact with the model.

 

Only pilot in excell :

 

        Dim obj As RobotObjObject
        Dim FECollection As RobotFiniteElementCollection
        Dim FEs As String
        Dim NodesSel As String
        Dim NodeSelection As RobotSelection
        Dim NodeCollection As RobotNodeCollection
        
        Set RSelection = RobApp.Project.Structure.Selections.Create(I_OT_FINITE_ELEMENT)
        Set NodesSelection = RobApp.Project.Structure.Selections.Create(I_OT_NODE)
        RSelection.FromText ""
        NodesSelection.FromText " "
        
        For jj = 1 To PanelCol.Count
            Set obj = RobApp.Project.Structure.Objects.Get(PanelCol.Get(jj).Number)
            FEs = obj.FiniteElems
            NodeSel = obj.Nodes
            RSelection.AddText (FEs)
            NodesSelection.AddText (NodeSel)
        Next jj
        
        Set RSelection = RobApp.Project.Structure.Selections.Create(I_OT_FINITE_ELEMENT)
        
                
        If (OptionButton1.Value) Then
            Set RSelection = RobApp.Project.Structure.Selections.Get(I_OT_FINITE_ELEMENT)
            If (RSelection.Count = 0) Then
                MsgBox "FEs not selected", vbOKOnly, "ERROR"
                RobApp.Interactive = True
            Exit Sub
            End If
        End If
        
        If (OptionButton2.Value) Then
            Set NodesSelection = RobApp.Project.Structure.Selections.Get(I_OT_NODE)
            num_node = Cells(9, 2)
            If num_node <> "" Then
                NodesSelection.FromText num_node
                Set NodesSelection = RobApp.Project.Structure.Nodes.GetMany(NodesSelection)
            Else
                If (NodesSelection.Count = 0) Then
                    MsgBox "Nodes not selected", vbOKOnly, "ERROR"
                    RobApp.Interactive = True
                    Set NodesSelection = Nothing
                    Exit Sub
                End If
            End If
        End If
        
        Set FECollection = RobApp.Project.Structure.FiniteElems.GetMany(RSelection)
        Set NodeCollection = RobApp.Project.Structure.Nodes.GetMany(NodesSelection)

 I just want to choose nodes and cases in excell.

 

Can you modify the macro for it ?

Message 42 of 75
rsousa_
in reply to: mateaus

I don't know if i understand correctly what you want, but see if this can help you. You have to put your selection set only in excel... Test the sheet, because i had little time to program the exceptions...

 

Regards

Message 43 of 75

Every time I get the same error "Select case(s), combinations(s) in robot.

 

What I have to do? I put case in B10 cell but still doesn0t work

 

 

 

screen api.JPG

Message 44 of 75
Anonymous
in reply to: Rafal.Gaweda

hi @Rafal.Gaweda I say you macro "panel_res", but I do not get the same results as in ARSA. In particular in ARSA I get Max moment around 12 kNm/m while in your macro 8.2 kNm/m. Maybe through your macro I obtain different values. If yes, how can I get the value through macro of Maps-Detailed-Moment please?

 

Thanks Rafal

Message 45 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

Macro gives you exactly the same values like in Robot

 

fe.jpg



Rafal Gaweda
Message 46 of 75
Anonymous
in reply to: Rafal.Gaweda

thanks @Rafal.Gaweda for replying,

 

How can I get the Moment Value 12.78 kNm/m that appears in the Result-Maps?

Because I did by hand the calculation and the result should be around that number.

Message 47 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

You need to modify macro to get Myy results



Rafal Gaweda
Message 48 of 75
Anonymous
in reply to: Rafal.Gaweda

@Rafal.Gaweda I kindly ask you if you could add here the strings to add that code.

 

Can you send me the link where is written the difference between the Fe complex value and the Fe principal value please?

Message 49 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

This way:

 

1277.jpg



Rafal Gaweda
Message 50 of 75
Anonymous
in reply to: Rafal.Gaweda

Hi @Rafal.Gaweda could you please post here a screen or a video about to import results if I select: Load Case Code Combinations - Full automatic combinations, please?

Because I do not get results if I select that code combinations

Message 51 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

This macro does not work for Code Combinations.

You have to add some code to it doing that.



Rafal Gaweda
Message 52 of 75
Anonymous
in reply to: Rafal.Gaweda

@Rafal.Gaweda Can you kindly put some piece of that code please?

Message 53 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

Here you are

 

....
            ElseIf (RCaseCol.Get(ii).Type = I_CT_CODE_COMBINATION) Then
          
                Dim CCount As Integer
                Dim CCa As RobotCodeCombination
                Set CCa = RCaseCol.Get(ii)
                CCount = CCa.Components.Count
                Dim StrCC As String
                StrCC = Str(CCount)
                
                If InStr(RCaseCol.Get(ii).Name, "+") <> 4 And InStr(RCaseCol.Get(ii).Name, "-") <> 4 And InStr(RCaseCol.Get(ii).Name, "+") <> 8 And InStr(RCaseCol.Get(ii).Name, "-") <> 8 Then
                    FEparams.Case = CCa.Number
                    
                    For icomp = 1 To CCount
                        row = row + 1
                        FEparams.CaseCmpnt = icomp
   
                    If (OptionButton1.Value) Then Cells(row, 1) = Str(FEparams.Element) + " / " + Str(FEparams.Case) + " / " + Str(FEparams.CaseCmpnt)
                    If (OptionButton2.Value) Then Cells(row, 1) = Str(FEparams.Node) + " / " + Str(FEparams.Case) + " / " + Str(FEparams.CaseCmpnt)
                    If (OptionButton3.Value) Then Cells(row, 1) = Str(FEparams.Panel) + " / " + Str(FEparams.Node) + " / " + Str(FEparams.Case) + " / " + Str(FEparams.CaseCmpnt)
                
                    Set FEresults = RobApp.Project.Structure.Results.FiniteElems.Detailed(FEparams)
                    Cells(row, 2) = FEresults.QXX
                    Cells(row, 3) = FEresults.QYY
                    Set FEcomplex = RobApp.Project.Structure.Results.FiniteElems.Complex(FEparams)
                    Cells(row, 4) = FEcomplex.MXX_TOP
                    Cells(row, 5) = FEcomplex.MXX_BOTTOM
                    Cells(row, 6) = FEcomplex.MYY_TOP
                    Cells(row, 7) = FEcomplex.MYY_BOTTOM
                    Next icomp
                    
                End If
...


Rafal Gaweda
Message 54 of 75
Anonymous
in reply to: Rafal.Gaweda

@Rafal.Gaweda the units are daNm/m?  Because I'm getting confuse with this macro about the units! Can you specify them please?

Message 55 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

SI units (N, m, Nm...).

All data set \ get \ stored in Robot by API should be in SI units. If you want different units you need to multiply results in code by your own.



Rafal Gaweda
Message 56 of 75
Anonymous
in reply to: Rafal.Gaweda

@Rafal.Gaweda Does not matter if I have daNm/m in my Results-Maps?

Just to confirm: Membrane forces [N]

Moment [Nm/m]

Shear forces [N/m]

Correct?

Message 57 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

All data set \ get \ stored in Robot by API should be \ is in SI units. If you want different units you need to multiply results in code by your own.



Rafal Gaweda
Message 58 of 75
Anonymous
in reply to: Rafal.Gaweda

Hi @Rafal.Gaweda 

I would share with you my problem with your macro! It is awesome and I use it almost everyday!

I'm designing a classic pool, for Walls 7 and 9 everything is perfect  but I get 0 values for the wall 8 and 10. Could you check the reason please?

Thanks

Message 59 of 75
Rafal.Gaweda
in reply to: Anonymous

Hi @Anonymous

 

You need to adjust results direction settings.

 

It is defined 

 

FEparams.SetDirX I_OLXDDT_CARTESIAN, 1, 0, 0

 

For walls along Y it should be

 

FEparams.SetDirX I_OLXDDT_CARTESIAN, 0, 1, 0

 

 

 



Rafal Gaweda
Message 60 of 75
Anonymous
in reply to: Rafal.Gaweda

@Rafal.Gaweda I have changed the code 

FEparams.SetDirX I_OLXDDT_CARTESIAN, 1, 0, 0

in

FEparams.SetDirX I_OLXDDT_CARTESIAN, 0, 1, 0

but I still get 0 values. 

 

In any case, Do I have to change every time the code depending if I'm exporting values from X directions or Y directions?

 

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

Post to forums  

Autodesk Design & Make Report