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: 

(API) FEM Results

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
a54249
833 Views, 7 Replies

(API) FEM Results

Hello,

After running a calculation on robot i'm trying to get only the maximum result, like a displacement or a stress, by using the following algorithm in VB.
But i think it's taking too long, is any better/faster way? I only need for the first case of loads.

    If Iniciar = True Then
      Dim i As Integer
      Dim robApp As IRobotApplication
      robApp = New RobotApplication

      Dim cas_col As RobotCaseCollection
      cas_col = robApp.Project.Structure.Cases.GetAll

      Dim fe_col As RobotFiniteElementCollection
      fe_col = robApp.Project.Structure.FiniteElems.GetAll

      Dim cas As IRobotCase
      cas = cas_col.Get(1)

      Dim numCas As Long
      numCas = cas.Number
      Dim params As New RobotFeResultParams

      Dim max As Double
      Dim m As Double
      max = 0
      m = 0

      For i = 1 To fe_col.Count

        Dim fe As IRobotFiniteElement
        fe = fe_col.Get(i)

        Dim numFe As Long
        numFe = fe.Number

        params.Element = numFe
        params.Case = numCas

        Dim princFE As IRobotFeResultPrincipal
        princFE = robApp.Project.Structure.Results.FiniteElems.Principal(params)

        m = -princFE.UGZ

        princFE = Nothing
        cas = Nothing

        If m > max Then
          max = m
        End If

        fe = Nothing
      Next i
      robApp = Nothing
      Result = max
    End If

 Thanks in advance!

7 REPLIES 7
Message 2 of 8
Ken_Marsh
in reply to: a54249

Do you need to do it programmatically? The Robot tables will give you maximums and minimums on the envelope tab.
Ken Marsh
Owner Marsh API
Message 3 of 8
a54249
in reply to: Ken_Marsh

Thanks for the answer Ken but unfortunately it has to be programmatically.
Message 4 of 8
Rafal.Gaweda
in reply to: a54249
Message 5 of 8
a54249
in reply to: Rafal.Gaweda

Thanks Rafael, I should have spent more time looking in the forum. I'm going to try this.

Message 6 of 8
a54249
in reply to: Rafal.Gaweda

I've tried the other post but i'm having some difficulties, isn't there any easier way of only getting the extreme value in the whole structure (it only has panels)?

I was reading the ROS API and I found "IRobotExtremeResultServer" and "IRobotExtremeValue (Structure providing access to information about the extreme value.)"
But I can't implement this correctly due to my inexperience. Is it even possible?

Thanks for the help.

Message 7 of 8
Rafal.Gaweda
in reply to: a54249

Example for bars

 

Dim s As RobotSelection
        Dim sc As RobotSelection


        Set s = RobApp.Project.Structure.Selections.Create(I_OT_BAR)
        Set sc = RobApp.Project.Structure.Selections.Create(I_OT_CASE)

        s.AddText ("54")
        sc.AddText ("1")

        Dim es As RobotOM.RobotExtremeParams

        Set es = RobApp.CmpntFactory.Create(I_CT_EXTREME_PARAMS)
        es.ValueType = I_EVT_FORCE_BAR_MY
        es.BarDivision = 10000

        es.Selection.Set I_OT_BAR, s
        es.Selection.Set I_OT_CASE, sc

        Dim v As String
        Dim p As String
        Dim b As String
        Dim c As String

            b = Str(RobApp.Project.Structure.Results.Extremes.MinValue(es).Bar)
        v = Str(RobApp.Project.Structure.Results.Extremes.MinValue(es).Value)
        p = Str(RobApp.Project.Structure.Results.Extremes.MinValue(es).Position)
        c = Str(RobApp.Project.Structure.Results.Extremes.MinValue(es).Case)

        MsgBox " MyMin = " & v & " at " & p & " (case " & c & ")", vbOKOnly
                
        b = Str(RobApp.Project.Structure.Results.Extremes.MaxValue(es).Bar)
        v = Str(RobApp.Project.Structure.Results.Extremes.MaxValue(es).Value)
        p = Str(RobApp.Project.Structure.Results.Extremes.MaxValue(es).Position)
        c = Str(RobApp.Project.Structure.Results.Extremes.MaxValue(es).Case)

        MsgBox " MyMAX = " & v & " at " & p & " (case " & c & ")", vbOKOnly, "Results"

 



Rafal Gaweda
Message 8 of 8
a54249
in reply to: Rafal.Gaweda

Thanks once again Rafal, it worked perfectly!

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

Post to forums  

Autodesk Design & Make Report