(API) Configuration Steel Design

(API) Configuration Steel Design

Anonymous
Not applicable
2,146 Views
14 Replies
Message 1 of 15

(API) Configuration Steel Design

Anonymous
Not applicable

Hello,

 

I'm developing some code for Steel Design of EC3. I want manipulate calculations configuration, specifically the checkbox (See picture attached):

 

-Shear verification in elastic state [6.2.6];

-Methods of calc. of interation factores kij (Method 1 or Method 2)

 

In VBA i just can manipulate AISI regulation. Example:

 

RDmCalCnf.SetFlag I_DCCFT_ANSI_CALCMETHOD_LRFD, 1
RDmCalCnf.SetFlag I_DCCFT_ANSI_CALCMETHOD_ASD, 1

 

How can i checkbox Method1 or Method2 from EC3?

 

best regards,

 

 

0 Likes
Accepted solutions (2)
2,147 Views
14 Replies
Replies (14)
Message 2 of 15

Anonymous
Not applicable

Can someone help me? because i can't continue my work.

 

Best regards,

 

0 Likes
Message 3 of 15

Rafal.Gaweda
Autodesk Support
Autodesk Support
I am afraid these settings are not implemented in API so far.
Thank You for reporting we will do it asap.


Rafal Gaweda
0 Likes
Message 4 of 15

Anonymous
Not applicable

thank for your answer, i'll do it with AISI.

 

One more question, I'm doing a Optimization (weight) and i need to export the group results for Excel (section, ratio, Lay, Laz). How can i do it?

 

I already see how can i do it with member verification but i can´t figure it out with group Design. Can you help me?

 

regards,

0 Likes
Message 5 of 15

Anonymous
Not applicable

I already see the example code in Steel Design API.pdf (4.4.8 Getting Calculation Results from a Collection of Design Results for a Member Group - page 101) but i always get a error in this line:

 

Set RDmGrpRes = RdmAllRes.Get(4) ' for group with number 2

0 Likes
Message 6 of 15

Rafal.Gaweda
Autodesk Support
Autodesk Support

Example code:

 

Public Sub CommandButton1_Click()

Dim UlsLoadCase As Integer
Dim RobApp As IRobotApplication
Set RobApp = New RobotApplication

UlsLoadCase = 1

Dim RDMServer As IRDimServer
Set RDMServer = RobApp.Kernel.GetExtension("RDimServer")
RDMServer.Mode = I_DSM_STEEL

Dim RDmEngine As IRDimCalcEngine
Set RDmEngine = RDMServer.CalculEngine
Dim RDmCalPar As IRDimCalcParam
Dim RDmCalCnf As IRDimCalcConf

Dim RdmStream As IRDimStream 'Data stream for setting parameters
Set RdmStream = RDMServer.Connection.GetStream
RdmStream.Clear

Dim RDMGrps As RDimGroups
Set RDMGrps = RDMServer.GroupsService
        
    For I = 0 To RDMGrps.Count - 1
    
        usrgr = RDMGrps.GetUserNo(I)
    
   
Set RDmCalPar = RDmEngine.GetCalcParam
Set RDmCalCnf = RDmEngine.GetCalcConf

'
RdmStream.WriteLong usrgr ' group selection
RDmCalPar.SetObjsList I_DCPVT_GROUPS_DESIGN, RdmStream  'group design
RDmCalPar.SetLimitState I_DCPLST_ULTIMATE, 1
RdmStream.Clear
RdmStream.WriteText Str(UlsLoadCase) 'Set Load Case(s)
RDmCalPar.SetLoadsList RdmStream
RDmEngine.SetCalcConf RDmCalCnf
RDmEngine.SetCalcParam RDmCalPar

'end of calclulation parameter settings

RDmEngine.Solve Nothing

Dim RDMGroupRes As IRDimGrpRes
Dim RDMAllRes As IRDimAllRes
Dim RDmDetRes As IRDimDetailedRes
Dim PrfFamCnt As Long
Dim Index As Long
Dim OptFamIndex As Long


Set RDMAllRes = RDmEngine.Results
Set RDMGroupRes = RDMAllRes.Get(usrgr)

PrfFamCnt = RDMGroupRes.FamiliesCount

For Index = 0 To PrfFamCnt - 1
Range("b" & 1 + I) = "Ratio"
If RDMGroupRes.Check(Index, I_DGRCP_GOVERNING) Then
    Set RDmDetRes = RDMGroupRes.Get(Index, I_DGRCP_GOVERNING)

    Range("c" & 1 + I) = RDmDetRes.Ratio
    Row = Row + 1
End If
Next Index
Next I

End Sub


Rafal Gaweda
0 Likes
Message 7 of 15

Anonymous
Not applicable

Hello Rafal, thank you for code example, i already can get ratios and the other parameters in Excel but i have one more question. 
For any group, i have diferent section (members) and the code just give me the last section ratio (you can see in img attach.), but i need "ok"  ratios  (I_DGRCP_GOVERNING) for all sections inside of a group. How can i do that?

 

thank you in advance,

 

regards

0 Likes
Message 8 of 15

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution

just modify display loop:

 

Public Sub CommandButton1_Click()

Dim UlsLoadCase As Integer
Dim RobApp As IRobotApplication
Set RobApp = New RobotApplication

UlsLoadCase = 1

Dim RDMServer As IRDimServer
Set RDMServer = RobApp.Kernel.GetExtension("RDimServer")
RDMServer.Mode = I_DSM_STEEL

Dim RDmEngine As IRDimCalcEngine
Set RDmEngine = RDMServer.CalculEngine
Dim RDmCalPar As IRDimCalcParam
Dim RDmCalCnf As IRDimCalcConf

Dim RdmStream As IRDimStream 'Data stream for setting parameters
Set RdmStream = RDMServer.Connection.GetStream
RdmStream.Clear

Dim RDMGrps As RDimGroups
Set RDMGrps = RDMServer.GroupsService

Row = 1
    For I = 0 To RDMGrps.Count - 1
    
        usrgr = RDMGrps.GetUserNo(I)
    
   
Set RDmCalPar = RDmEngine.GetCalcParam
Set RDmCalCnf = RDmEngine.GetCalcConf

'
RdmStream.WriteLong usrgr ' group selection
RDmCalPar.SetObjsList I_DCPVT_GROUPS_DESIGN, RdmStream  'group design
RDmCalPar.SetLimitState I_DCPLST_ULTIMATE, 1
RdmStream.Clear
RdmStream.WriteText Str(UlsLoadCase) 'Set Load Case(s)
RDmCalPar.SetLoadsList RdmStream
RDmEngine.SetCalcConf RDmCalCnf
RDmEngine.SetCalcParam RDmCalPar

'end of calclulation parameter settings

RDmEngine.Solve Nothing

Dim RDMGroupRes As IRDimGrpRes
Dim RDMAllRes As IRDimAllRes
Dim RDmDetRes As IRDimDetailedRes
Dim PrfFamCnt As Long
Dim Index As Long
Dim OptFamIndex As Long


Set RDMAllRes = RDmEngine.Results
Set RDMGroupRes = RDMAllRes.Get(usrgr)

PrfFamCnt = RDMGroupRes.FamiliesCount

For Index = 0 To PrfFamCnt - 1
Range("b" & Row) = "Ratio"
If RDMGroupRes.Check(Index, I_DGRCP_GOVERNING) Then
    Set RDmDetRes = RDMGroupRes.Get(Index, I_DGRCP_GOVERNING)

    Range("c" & Row) = RDmDetRes.Ratio
    Range("d" & Row) = usrgr
    Range("e" & Row) = RDmDetRes.ProfileName
    Row = Row + 1
End If
Next Index
Next I

End Sub


Rafal Gaweda
0 Likes
Message 9 of 15

Anonymous
Not applicable

oh i get it, its done 😄 thank you Rafal!

 

 

0 Likes
Message 10 of 15

Anonymous
Not applicable

Hi everyone,

 

Regarding this topic for EC steel:

-Methods of calc. of interation factores kij (Method 1 or Method 2)

@Rafal.Gaweda, Is it already implemented by API?

 

Thanks 

0 Likes
Message 11 of 15

PABLO.SANCHEzZTKJ5
Enthusiast
Enthusiast

Hi,

It's been a long time and there is no response on this.
Reviewing the classes and members of the API, I found this, which I don't remember if it was implemented in versions prior to 2023. Do you know if it is feasible to use it to define the EC3 method on interaction factors?

 

PABLOSANCHEzZTKJ5_0-1676979031707.png

 

 

0 Likes
Message 12 of 15

HI @PABLO.SANCHEzZTKJ5 

did you test this (on page 67) ?

RDmCalCnf.SetFlag I_DCCFT_EC3_CALCMETHOD_1, True

 Best Regards

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 13 of 15

PABLO.SANCHEzZTKJ5
Enthusiast
Enthusiast

Thanks for the info @Stephane.kapetanovic,

 

Yes, i'm using the following snipped in my total code, but it seems doesn't work:

 

Set RDmCalPar = RDmEngine.GetCalcParam
Set RDmCalCnf = RDmEngine.GetCalcConf
RDmCalCnf.NPointsNum = 10
RDmCalCnf.SetFlag I_DCCFT_EC3_CALCMETHOD_1, True
RDmEngine.SetCalcConf RDmCalCnf
Set RdmStream = RDmServer.Connection.GetStream
RdmStream.Clear

 

maybe I'm doing something wrong, but always the ratio results by API are the same than for Method 2 -> Annex B

0 Likes
Message 14 of 15

Accepted solution

hi @PABLO.SANCHEzZTKJ5 

They are not part of "API Design of Steel and Timber Elements" 2023, probably visible but not configurable.

Out of curiosity, are they readable? Is it possible to set one of them to false?

 

Dim Test1 As Boolean, Test2 As Boolean
With RDmCalCnf
  Test1 = .IsFlagSet(I_DCCFT_EC3_CALCMETHOD_1)
  Test2 = .IsFlagSet(I_DCCFT_EC3_CALCMETHOD_2)
End With
Debug.Print Test1, Test2

 

Best Regards

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 15 of 15

PABLO.SANCHEzZTKJ5
Enthusiast
Enthusiast

Hi @Stephane.kapetanovic 

 

Yes, it seems as you said, "visible" but "not configurable".

Implementing your check code with not "set flag", the result is:

-> False True, so it seems is always used Annex B by default.

 

Using the following setflag's:

RDmCalCnf.SetFlag I_DCCFT_EC3_CALCMETHOD_1, True
RDmCalCnf.SetFlag I_DCCFT_EC3_CALCMETHOD_2, False

 

The result is:

-> True false, but the ratios are the same than in previous calculation, that is, based in Annex B

 

Therefore I think those flags are not configurable.

 

Thanks for your comments. It would be very appreciated if someone from Autodesk commented on it, sometimes it seems that Robot is discontinued.

0 Likes