[API] Define Membertype Adjoin Params

[API] Define Membertype Adjoin Params

BadrDerouiche
Contributor Contributor
2,399 Views
2 Replies
Message 1 of 3

[API] Define Membertype Adjoin Params

BadrDerouiche
Contributor
Contributor

Hello,

Trying to define automation for member type with Adjoin member.

I founded documentation in the Robot Steel API, can assign deferent parameter but I couldn't access to "IRDimAdjoinParams" interface which is the key according to the documentation.
Any help or insight will be appreciated, 

Best Regards,

Badr

0 Likes
Accepted solutions (1)
2,400 Views
2 Replies
Replies (2)
Message 2 of 3

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

hi @BadrDerouiche 

try this

IRobotApplication RobApp = new RobotApplication();
RobotLabelServer Labels = RobApp.Project.Structure.Labels;
RobotProjectPreferences Preferences = RobApp.Project.Preferences;
int Code = Preferences.SetActiveCode(IRobotCodeType.I_CT_STEEL_STRUCTURES,
                                       "NF EN 1993-1-1:2005/NA:2013/A1:2014");
RDimServer DimServer = RobApp.Project.DimServer; 
           DimServer.Mode = IRDimServerMode.I_DSM_STEEL;
RDimConnection Connection = DimServer.Connection;

RDimAdjoinParams AdjParams = Connection.GetAdjoinParams();
void SetAdjMemb(IRDimAdjoinMembSuppCond AdjBeamSuppCond,
                params int[] Numbers) {
   IRDimAdjoinMembNo No; bool isBeam;
   for (int i = 0; i < Numbers.Length; i++) {
      No = (IRDimAdjoinMembNo)(i + 1); isBeam = (i + 1) % 3 != 0;
      AdjParams.SetMemberUserNo(No, Numbers[i]);
      if (isBeam) AdjParams.SetMemberSuppCond(No, AdjBeamSuppCond);
   }
}

string LabelName = "Column_7";
IRobotLabel Lbl = Labels.Create(I_LT_MEMBER_TYPE, LabelName);
IRDimMembDefData LblData = Lbl.Data;
IRDimMembParamsE32 MParams = (IRDimMembParamsE32)LblData.CodeParams;

MParams.BucklingDiagramY = I_DBD_E32_INTERN_ADJBAR_6; 
SetAdjMemb(I_DAMSC_SUPPCOND_MIXED, 1, 2, 3, 4, 5, 6);
LblData.SetStructureSwayYZ(I_DMDBDT_BUCKLING_Y, 1);
LblData.RetrieveAdjoinParamsYZ(I_DMDBDT_BUCKLING_Y, AdjParams);

LblData.CodeParams = MParams;
Labels.Store(Lbl);

int BarNo = 7;
RobApp.Project.Structure.Bars.Get(BarNo).SetLabel(I_LT_MEMBER_TYPE, LabelName);

Best Regards

Stephanekapetanovic_0-1688737516897.png

Other cases are possible, for example

MParams.BucklingDiagramY = I_DBD_E32_PINNED_ADJBAR_3;
SetAdjMemb(I_DAMSC_SUPPCOND_MIXED, 1, 2, 3);

see also : Member type adjoining members via API using VBA 

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
Message 3 of 3

BadrDerouiche
Contributor
Contributor

Hi @Stephane.kapetanovic , 

Sorry being late, that's work perfectly.

Thanks a lot for your help.

Best regard,