Export results ARSA via API

Export results ARSA via API

Anonymous
해당 사항 없음
14,915 조회수
74 답변
1/75 메시지

Export results ARSA via API

Anonymous
해당 사항 없음

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

0 Likes
수락된 솔루션(3)
14,916 조회수
74 답변
답변 (74)
41/75 메시지

Anonymous
해당 사항 없음

@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 ?

0 Likes
42/75 메시지

rsousa_
Advocate
Advocate
수락된 솔루션

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

43/75 메시지

Anonymous
해당 사항 없음

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

0 Likes
44/75 메시지

Anonymous
해당 사항 없음

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

0 Likes
45/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

Macro gives you exactly the same values like in Robot

 

fe.jpg



Rafal Gaweda
46/75 메시지

Anonymous
해당 사항 없음

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.

0 Likes
47/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

You need to modify macro to get Myy results



Rafal Gaweda
0 Likes
48/75 메시지

Anonymous
해당 사항 없음

@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?

0 Likes
49/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

This way:

 

1277.jpg



Rafal Gaweda
50/75 메시지

Anonymous
해당 사항 없음

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

0 Likes
51/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @Anonymous

 

This macro does not work for Code Combinations.

You have to add some code to it doing that.



Rafal Gaweda
0 Likes
52/75 메시지

Anonymous
해당 사항 없음

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

0 Likes
53/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

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
54/75 메시지

Anonymous
해당 사항 없음

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

0 Likes
55/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

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
0 Likes
56/75 메시지

Anonymous
해당 사항 없음

@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?

0 Likes
57/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

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
0 Likes
58/75 메시지

Anonymous
해당 사항 없음

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

0 Likes
59/75 메시지

Rafal.Gaweda
Autodesk Support
Autodesk Support

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
0 Likes
60/75 메시지

Anonymous
해당 사항 없음

@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?

 

0 Likes