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

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 !
