Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API Steel design - how to change sections to designed ones?

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
luksevics
1402 Views, 9 Replies

API Steel design - how to change sections to designed ones?

Hello!
I'm making program, which will do steel structure optimization.
I define the structure, set up design groups, make static calculations then Code group design.
In code group design I get profile name:

RdmDetRes = RDmGrpRes.Get(0, IRDimGrpResCurrProf.I_DGRCP_GOVERNING);
opt_profile = RdmDetRes.ProfileName;

              
But how do I change the bar profile to designed ones? Do I really have to have all the sections within optimisation range with their Labels defined in model?
In visual interface there is "change all" button.

Maybe there is any example? I'm writing C# but any example would be very useful.

 

P.S. One more " bonus" question - Is there access to "Cost Estimation" table through API? I'm looking for the fastest way to get total weight of structure.

9 REPLIES 9
Message 2 of 10
luksevics
in reply to: luksevics

I already found answer to "bonus" question. IRobotMaterialQuantitySurvey class will do the work 🙂
Message 3 of 10
Rafal.Gaweda
in reply to: luksevics

              

But how do I change the bar profile to designed ones? 

 

http://forums.autodesk.com/t5/Autodesk-Robot-Structural/Changhing-sections-with-ROBOT-API-seems-slow...



Rafal Gaweda
Message 4 of 10
Rafal.Gaweda
in reply to: luksevics

I'm looking for the fastest way to get total weight of structure.


Usually Case 1 = selweight (or any other)

so get FZ sum of reactions of sw case.

 

swapi.jpg

 



Rafal Gaweda
Message 5 of 10
luksevics
in reply to: Rafal.Gaweda

Thank you, but this example (just as steel frame example within SDK) works with labels which are already defined in "sections"  window.

IRobotNamesArray inames = robotApp.Project.Structure.Labels.GetAvailableNames(IRobotLabelType.I_LT_BAR_SECTION);

 Or maybe I am missing something?

Message 6 of 10
Rafal.Gaweda
in reply to: luksevics

You can get designed section name by IRDimDetailedRes.ProfileName, then use standard Bar.SetLabel...

There is no "Change All" or "Change" implemented in Steel Design API.



Rafal Gaweda
Message 7 of 10
luksevics
in reply to: Rafal.Gaweda

Thanks a lot! When I started studies in university (6 years ago) there were almost no information on the internet about Robot (except Millenium videos). You, Artur and Pavel are bringing the light in this dark room! 🙂 The working with robot for master thesis seems much easier - almost every question has answer on this forum! Thanks again!
Message 8 of 10
Rafal.Gaweda
in reply to: luksevics

there were almost no information on the internet about Robot (except Millenium videos). 
Indeed there was no forum but....


Rafal Gaweda
Message 9 of 10
luksevics
in reply to: Rafal.Gaweda

            IRobotBarSectionQuantitySurvey qsurvey;
            qsurvey = iapp.Project.Structure.QuantitySurvey.BarSections;
            double sectcount = qsurvey.Count;
            double sectweight=0;
            string sectname="";
            for (var i = 1; i <= sectcount; i++)
            {
                sectweight = qsurvey.GetWeight(i) / 9.80665;
                sectname = qsurvey.GetName(i);
                MessageBox.Show(sectname + "  " + sectweight.ToString());
            }

 This is code i'm using to get weights for every section. Maybe helps for someone.

Message 10 of 10
luksevics
in reply to: Rafal.Gaweda

This post also helped me:

http://forums.autodesk.com/t5/Autodesk-Robot-Structural/Api-IRobotBarCableData/m-p/3579412/highlight...

 

I'm changing profiles this way:

  for (var i = 1; i <= ObjCnt; i++)
            {
                RDmGrpRes = (IRDimGrpRes)RdmAllRes.Get(i); // reading design group results
                
// for optimisation only one profile family, therefore first parameter always 0 RdmDetRes = RDmGrpRes.Get(0, IRDimGrpResCurrProf.I_DGRCP_GOVERNING); opt_profils = RdmDetRes.ProfileName; //create profile label IRobotLabel opt_label = iapp.Project.Structure.Labels.Create(IRobotLabelType.I_LT_BAR_SECTION, opt_profils); IRobotBarSectionData SData = (IRobotBarSectionData)opt_label.Data; SData.LoadFromDBase(opt_profils); iapp.Project.Structure.Labels.Store(opt_label); // apply label and material to the bars RobotSelection isel_dim = iapp.Project.Structure.Selections.Create(IRobotObjectType.I_OT_BAR); isel_dim.AddText(dgrp_members[i]); ibars.SetLabel(isel_dim, IRobotLabelType.I_LT_BAR_SECTION, opt_profils); ibars.SetLabel(isel_dim, IRobotLabelType.I_LT_MATERIAL, default_material); isel_dim.Clear(); }

 I belive that routine could be speeded up by using LoadFromDBase2() instead LoadFromDBase()

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report