Discussion Groups

Robot Structural Analysis

Reply
Active Contributor
samuel.pereira
Posts: 28
Registered: ‎01-02-2012
Accepted Solution

Robot Steel API - Member definition parameters

591 Views, 10 Replies
06-19-2012 04:30 AM

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

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,189
Registered: ‎04-26-2010

Re: Robot Steel API - Member definition parameters

06-19-2012 05:26 AM in reply to: samuel.pereira

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

 

 




Rafal Gaweda
Please use plain text.
Active Contributor
samuel.pereira
Posts: 28
Registered: ‎01-02-2012

Re: Robot Steel API - Member definition parameters

06-19-2012 06:17 AM in reply to: samuel.pereira

Thank you!

Please use plain text.
Active Contributor
samuel.pereira
Posts: 28
Registered: ‎01-02-2012

Re: Robot Steel API - Member definition parameters

06-19-2012 06:50 AM in reply to: Rafal.Gaweda

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!

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,189
Registered: ‎04-26-2010

Re: Robot Steel API - Member definition parameters

06-19-2012 07:05 AM in reply to: samuel.pereira

Wrong Params.

 

    RobApp.Project.Preferences.SetActiveCode I_CT_STEEL_STRUCTURES, "ENV 1993-1:2005"
'.....
    Dim RDimMembParams As IRDimMembParamsE32

 

 



Rafal Gaweda
Please use plain text.
Active Contributor
samuel.pereira
Posts: 28
Registered: ‎01-02-2012

Re: Robot Steel API - Member definition parameters

06-19-2012 07:16 AM in reply to: Rafal.Gaweda

Ok! Already works! Thank you!

Please use plain text.
Active Contributor
samuel.pereira
Posts: 28
Registered: ‎01-02-2012

Re: Robot Steel API - Member definition parameters

06-19-2012 09:29 AM in reply to: samuel.pereira

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.

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,189
Registered: ‎04-26-2010

Re: Robot Steel API - Member definition parameters

06-20-2012 04:24 AM in reply to: samuel.pereira

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

 



Rafal Gaweda
Please use plain text.
New Member
ec06051
Posts: 2
Registered: ‎02-03-2014

Re: Robot Steel API - Member definition parameters

02-03-2014 03:48 AM in reply to: Rafal.Gaweda

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.

Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,849
Registered: ‎12-17-2010

Re: Robot Steel API - Member definition parameters

02-03-2014 06:39 AM in reply to: ec06051

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.



Artur Kosakowski
Please use plain text.