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: 

Robot member type definition by API

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
charlieCZech
899 Views, 5 Replies

Robot member type definition by API

Please is there somebody who can help me with Robot steel API. I would like to define member type by API, but I don't know how to define "additional sets of member parameters". See picture below.

 

SteelAPI

 

 

And my source code:

 

RobApp = New RobotApplication
RobApp.Visible = True

Dim MTData As IRDimMembDefData
Dim MTParam As IRDimMembParamsE32
Dim Label As IRobotLabel

RobApp.Project.Structure.Labels.Delete(IRobotLabelType.I_LT_MEMBER_TYPE, "example")
Label = RobApp.Project.Structure.Labels.Create(IRobotLabelType.I_LT_MEMBER_TYPE, "example")

MTData = Label.Data
MTData.SetLengthYZUV(IRDimMembDefLengthDataType.I_DMDLDT_LENGTH_Y, 1)
MTData.SetLengthYZUV(IRDimMembDefLengthDataType.I_DMDLDT_LENGTH_Z, -0.7)
MTParam = MTData.CodeParams

MTParam.BuckLengthCoeffY = 1
MTParam.BucklingDiagramY = IRDimBuckDiagramE32.I_DBD_E32_PINNED_PINNED_1_0
MTParam.BracedY = False
MTParam.BucklingCurveY = IRDimBucklingCurveE32.I_DBC_E32_CURVE_B
MTParam.BuckLengthCoeffZ = 1.43
MTParam.BucklingDiagramZ = IRDimBuckDiagramE32.I_DBD_E32_PINNED_PINNED_1_0
MTParam.BracedZ = False
MTParam.BucklingCurveZ = IRDimBucklingCurveE32.I_DBC_E32_CURVE_B
MTParam.TorsBuckOn = True
MTParam.LateralBuckling = False

MTData.CodeParams = MTParam
RobApp.Project.Structure.Labels.Store(Label)

 

Thanks in advance

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

        
        Dim Fire As IRDimFireResistE32
        Set Fire = MTParam.FireResist
        Fire.Active
        .....
        Dim THW As IRDimThinWalledE32
        Set THW = MTParam.ThinWalled
        THW.Active
        ....
        
        Dim ComplexS As IRDimComplexSectE32
        Set ComplexS = MTParam.ComplexSect
        ComplexS.Active
        .....
        
        MTParam.RelLimitDeflUy = 200
        MTParam.RelLimitdeflUz = 200

 



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

Yes, but it doesn't work. Probably I'm doing somewhere mistake. 

 

Here is my source code (VB.net):

Imports RobotOM

Public Class Form1

    Public RobApp As IRobotApplication

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        RobApp = New RobotApplication
        RobApp.Visible = True

        Dim MTData As IRDimMembDefData
        Dim MTParam As IRDimMembParamsE32
        Dim Label As IRobotLabel

        RobApp.Project.Structure.Labels.Delete(IRobotLabelType.I_LT_MEMBER_TYPE, "example")
        Label = RobApp.Project.Structure.Labels.Create(IRobotLabelType.I_LT_MEMBER_TYPE, "example")

        MTData = Label.Data
        MTData.SetLengthYZUV(IRDimMembDefLengthDataType.I_DMDLDT_LENGTH_Y, 1)
        MTData.SetLengthYZUV(IRDimMembDefLengthDataType.I_DMDLDT_LENGTH_Z, -0.7)

        MTParam = MTData.CodeParams
        MTParam.BuckLengthCoeffY = 1
        MTParam.BucklingDiagramY = IRDimBuckDiagramE32.I_DBD_E32_PINNED_PINNED_1_0
        MTParam.BracedY = False
        MTParam.BucklingCurveY = IRDimBucklingCurveE32.I_DBC_E32_CURVE_B
        MTParam.BuckLengthCoeffZ = 1.43
        MTParam.BucklingDiagramZ = IRDimBuckDiagramE32.I_DBD_E32_PINNED_PINNED_1_0
        MTParam.BracedZ = False
        MTParam.BucklingCurveZ = IRDimBucklingCurveE32.I_DBC_E32_CURVE_B
        MTParam.RelLimitDeflUy = 200
        MTParam.RelLimitdeflUz = 200
        MTParam.TorsBuckOn = True
        MTParam.LateralBuckling = False

        Dim MTThin As IRDimThinWalledE32
        MTThin = MTParam.ThinWalled
        MTThin.Active = True
        MTThin.TypeOfForming = IRDimThinWalledFormingTypeE32.I_DTWFT_E32_ROLLED

        MTData.CodeParams = MTParam
        RobApp.Project.Structure.Labels.Store(Label)

    End Sub

End Class

 

Everything seems to be OK, but only additional sets of member parameters is not checked (Thin-walled sections).

 

I'm sending simple VB.net project in the attachment. After click on button I want to set member type parameters.

 

Best regards

 

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

        Dim MTThin As IRDimThinWalledE32
        MTThin = MTParam.ThinWalled
        MTThin.Active = True
        MTThin.TypeOfForming = IRDimThinWalledFormingTypeE32.I_DTWFT_E32_ROLLED
	 MTData.ThinWalled = MTThin ‘ this line missing
        MTData.CodeParams = MTParam
        RobApp.Project.Structure.Labels.Store(Label)

    End Sub

 



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

Yes, of course 🙂 Now it works! Good job

 

Thank you very much

Message 6 of 6
anacffaria
in reply to: Rafal.Gaweda

Hello @Rafal.Gaweda ,

I'm trying to activate thin wall using that solution in vba but to no avail. Can you please provide some insight?

Dim RdimLabelData  As IRDimMembDefData
Dim RDimMembParams As IRDimMembParamsE32
Dim MTThin As IRDimThinWalledE32

(...)

Set RLabel = robapp.Project.Structure.Labels.Create(I_LT_MEMBER_TYPE, "Pannes")
Set RdimLabelData = RLabel.Data

Dim L As Double

L = coordY(2) - coordY(1)

Set RDimMembParams = RdimLabelData.CodeParams

RDimMembParams.BuckLengthCoeffY = 1
RDimMembParams.BucklingDiagramY = I_DBD_E32_STIFF_STIFF_0_5
RDimMembParams.BracedY = False ' Sway
RDimMembParams.LateralBuckling = False

RDimMembParams.BuckLengthCoeffZ = 1
RDimMembParams.BucklingDiagramZ = I_DBD_EC3_INTERNAL_BRACINGS
RDimMembParams.BracedY = False ' Sway

RdimLabelData.CodeParams = RDimMembParams
RdimLabelData.SetIntPtAddOption I_DMDIPDT_BUCKLING_Z, I_DMDIPOT_MANUAL_COORDS, 1
RdimLabelData.SetIntPsCoordValueType I_DMDIPDT_BUCKLING_Z, 0

RdimLabelData.SetIntPtAddOption I_DMDIPDT_LBUCKLING_U, I_DMDIPOT_MANUAL_COORDS, 1
RdimLabelData.SetIntPsCoordValueType I_DMDIPDT_LBUCKLING_U, 0

RdimLabelData.SetIntPtAddOption I_DMDIPDT_LBUCKLING_L, I_DMDIPOT_MANUAL_COORDS, 1
RdimLabelData.SetIntPsCoordValueType I_DMDIPDT_LBUCKLING_L, 0

If L > 8 Then
    For i = 1 To 3
        RdimLabelData.SetIntPtValues I_DMDIPDT_BUCKLING_Z, 1 + i, 0.33 * L * i, 1
        RdimLabelData.SetIntPtValues I_DMDIPDT_LBUCKLING_U, 1 + i, 0.33 * L * i, 1
        RdimLabelData.SetIntPtValues I_DMDIPDT_LBUCKLING_L, 1 + i, 0.33 * L * i, 1
    Next i
Else
    i = 1
    Do While (0.5 * L * i) <= L
        RdimLabelData.SetIntPtValues I_DMDIPDT_BUCKLING_Z, 1 + (i - 1), 0.5 * L * i, 1
        RdimLabelData.SetIntPtValues I_DMDIPDT_LBUCKLING_U, 1 + (i - 1), 0.5 * L * i, 1
        RdimLabelData.SetIntPtValues I_DMDIPDT_LBUCKLING_L, 1 + (i - 1), 0.5 * L * i, 1
        
        i = i + 1
    Loop
End If

' Deflection
RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Y, 200
RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Z, 200
RdimLabelData.SetDeflectionYZ I_DMDDDT_DEFL_Y, 1
RdimLabelData.SetDeflectionYZ I_DMDDDT_DEFL_Z, 1

Set MTThin = RDimMembParams.ThinWalled
MTThin.Active = True
MTThin.TypeOfForming = I_DTWFT_E32_ROLLED

robapp.Project.Structure.Labels.Store RLabel
Set RLabel = Nothing

 

Much appreaciated for any help!
Thanks, Ana

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

Post to forums  

Autodesk Design & Make Report