I created Cables. I assigned MaterialName , SectionAX.
1) I don't know how to assign data from cable to created bar
2) How to set AssemblingParameters to dataCable
IRobotBarCableAssemblingParamType.I_BCAPT_FORCE_FO
IRobotApplication robApp;
IRobotStructure structure;
IRobotLabel Section;
string klasaStal = "S 355";
robApp = new RobotApplicationClass();
structure = robApp.Project.Structure;
IRobotNodeServer inds = robApp.Project.Structure.Nodes;
IRobotBarServer ibars = robApp.Project.Structure.Bars;
IRobotBarCableData kabel;
string StrKabelSciana = "Kabel_2";
Section = structure.Labels.Create(IRobotLabelType.I_LT_BAR_CABLE, StrKabelSciana);
kabel = (IRobotBarCableData)Section.Data;
kabel.MaterialName = klasaStal;
kabel.SectionAX = 20 * 0.0001; // cm^2
RobotSelection iselKabelSciana = robApp.Project.Structure.Selections.Create(IRobotObjectType.I_OT_BAR);
inds.Create(1, 0, 0, 0);
inds.Create(2, 5, 5, 0);
ibars.Create(1, 1, 2); // kabel lewa strona
iselKabelSciana.AddOne(1);
ibars.SetLabel(iselSciagSciana, IRobotLabelType.I_LT_BAR_CABLE, StrKabelSciana);
ibars.SetLabel(iselSciagSciana, IRobotLabelType.I_LT_MATERIAL, klasaStal);
robApp.Project.Structure.Labels.Store(Section);
structure.Bars.SetLabel(iselSciagSciana, IRobotLabelType.I_LT_BAR_CABLE, StrSciagSciana);
IRobotBarCableAssemblingParamType kabelFo;
//kabelFo = IRobotBarCableAssemblingParamType.I_BCAPT_FORCE_FO;
//kabelFo.Equals
// kabel.AssemblingParam = IRobotBarCableAssemblingParamType.I_BCAPT_FORCE_FO;
// kabel.AssemblingParamValue = 100;
Thank You in Advance
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Store label after creating \ modification.
private void setgeometry() { IRobotApplication robApp; IRobotStructure structure; IRobotLabel Section; string klasaStal = "S 355"; robApp = new RobotApplicationClass(); structure = robApp.Project.Structure; IRobotNodeServer inds = robApp.Project.Structure.Nodes; IRobotBarServer ibars = robApp.Project.Structure.Bars; IRobotBarCableData kabel; string StrKabelSciana = "Kabel_2"; Section = structure.Labels.Create(IRobotLabelType.I_LT_BAR_CABLE, StrKabelSciana); kabel = (IRobotBarCableData)Section.Data; kabel.MaterialName = klasaStal; kabel.SectionAX = 20 * 0.0001; // cm^2 RobotSelection iselKabelSciana = robApp.Project.Structure.Selections.Create(IRobotObjectType.I_OT_BAR); inds.Create(1, 0, 0, 0); inds.Create(2, 5, 5, 0); ibars.Create(1, 1, 2); // kabel lewa strona iselKabelSciana.AddOne(1); kabel.AssemblingParam = IRobotBarCableAssemblingParamType.I_BCAPT_FORCE_FO; kabel.AssemblingParamValue = 1000; robApp.Project.Structure.Labels.Store(Section); ibars.SetLabel(iselKabelSciana, IRobotLabelType.I_LT_BAR_CABLE, StrKabelSciana); ibars.SetLabel(iselKabelSciana, IRobotLabelType.I_LT_MATERIAL, klasaStal); }