Api IRobotBarCableData

Api IRobotBarCableData

Anonymous
Not applicable
620 Views
2 Replies
Message 1 of 3

Api IRobotBarCableData

Anonymous
Not applicable

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
                

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

Anonymous
Not applicable

I enclose the file, vs 2010, robot 2011

0 Likes
Message 3 of 3

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted 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);   
        
        
        }

 



Rafal Gaweda
0 Likes