Hello,
I'm trying to define members parameters, using Robot Steel API, to design a bar structure steel with EN1993-1.
I have seen the document "Robot API Steel Design" but I can’t do it. It’s possible provide a complete example to "Visual Basic -Microsoft Excel" for a “Bar” type?
Thanks
Solved! Go to Solution.
Solved by Artur.Kosakowski. Go to Solution.
Look closer at paragraphs 4.4.1 and 4.4.2 in mentioned doc.
Examlpe below
Set all \ required RDimMembParams in place where you cae see commented dots in code below
Dim RobApp As RobotApplication Set RobApp = New RobotApplication RobApp.Project.Preferences.SetActiveCode I_CT_STEEL_STRUCTURES, "ENV 1993-1:1992" Dim RLabel As IRobotLabel Dim RdimLabelData As IRDimMembDefData Dim RDimMembParams As IRDimMembParamsEC3 Set RLabel = RobApp.Project.Structure.Labels.Create(I_LT_MEMBER_TYPE, "My Label") Set RdimLabelData = RLabel.Data RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Y, 100 RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Z, 200 RdimLabelData.SetDisplXYRelLimit I_DMDDDT_DISP_X, 300 RdimLabelData.SetDisplXYRelLimit I_DMDDDT_DISP_Y, 400 Set RDimMembParams = RdimLabelData.CodeParams RDimMembParams.BuckLengthCoeffY = 10 '...... RdimLabelData.CodeParams = RDimMembParams RobApp.Project.Structure.Labels.Store RLabel
Hello,
When I run the Macro in Excel, it return an error:
Run-time '13'
Type mismatch
It occurs on line:
Dim RdimLabelData As IRDimMembDefData
Annex image with the error.
Thank you!
Wrong Params.
RobApp.Project.Preferences.SetActiveCode I_CT_STEEL_STRUCTURES, "ENV 1993-1:2005" '..... Dim RDimMembParams As IRDimMembParamsE32
Hello,
At the moment, I have defined the member type. What remains now is to assign the type of member to the respective bar, in other words, assign the type "My Label" to a bar 1 and 2, for example. How do this? You can send an example?
Thank you.
Like for all labels
for one \ given bar number
Dim Rbar As RobotBar Dim BarCollection As RobotBarCollection RobApp.Project.Structure.Bars.Get(bar_number).SetLabel I_LT_MEMBER_TYPE, "My Label" 'or Set Rbar = RobApp.Project.Structure.Bars.Get(bar_number) Rbar.SetLabel I_LT_MEMBER_TYPE, "My Label"
for bar collection
Set RobotBarCollection = ......... For i = 1 To BarCollection.Count BarCollection.Get(i).SetLabel I_LT_MEMBER_TYPE, "My Label" Next i
Dear all,
I tried to implement the code below with the corrections made and wasn't able to do it.
An error appears in the line that sets Member Parameters :
Set RDimMembParams = RdimLabelData.CodeParams
Sub A_MemType() Dim RobApp As RobotApplication Set RobApp = New RobotApplication RobApp.Project.Preferences.SetActiveCode I_CT_STEEL_STRUCTURES, "ENV 1993-1:2005" Dim RLabel As IRobotLabel Dim RdimLabelData As IRDimMembDefData Dim RDimMembParams As IRDimMembParamsE32 Set RLabel = RobApp.Project.Structure.labels.Create(I_LT_MEMBER_TYPE, "My Label") Set RdimLabelData = RLabel.data RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Y, 100 RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Z, 200 RdimLabelData.SetDisplXYRelLimit I_DMDDDT_DISP_X, 300 RdimLabelData.SetDisplXYRelLimit I_DMDDDT_DISP_Y, 400 Set RDimMembParams = RdimLabelData.CodeParams RDimMembParams.BuckLengthCoeffY = 10 '...... RdimLabelData.CodeParams = RDimMembParams RobApp.Project.Structure.labels.Store RLabel End Sub
Thanks in advance.
Try:
Sub A_MemType()
Dim RobApp As RobotApplication
Set RobApp = New RobotApplication
RobApp.Project.Preferences.SetActiveCode I_CT_STEEL_STRUCTURES, "EN 1993-1:2005/AC:2009" ‘ "ENV 1993-1:2005"
Dim RLabel As IRobotLabel
Dim RdimLabelData As IRDimMembDefData
Dim RDimMembCodeParams As Object ‘IRDimMembParamsE32
Set RLabel = RobApp.Project.Structure.labels.Create(I_LT_MEMBER_TYPE, "My Label")
Set RdimLabelData = RLabel.data
RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Y, 100 RdimLabelData.SetDeflYZRelLimit I_DMDDDT_DEFL_Z, 200
RdimLabelData.SetDisplXYRelLimit I_DMDDDT_DISP_X, 300 RdimLabelData.SetDisplXYRelLimit I_DMDDDT_DISP_Y, 400
Set RDimMembCodeParams = RdimLabelData.CodeParams
RDimMembCodeParams.BuckLengthCoeffY = 10
RdimLabelData.CodeParams = RDimMembCodeParams
RobApp.Project.Structure.labels.Store RLabel
End Sub
If you find your post answered press the Accept as Solution button please. This will help other users to find solutions much faster. Thank you.
Hello @Artur.Kosakowski,
how to translate Dim RDimMembCodeParams As Object in C# ?
Thank you in advance,
Regards
Louis
Can't find what you're looking for? Ask the community or share your knowledge.