Discussion Groups

Robot Structural Analysis

Reply
Contributor
ethor
Posts: 19
Registered: ‎10-13-2011

setting gamma using the API

155 Views, 3 Replies
11-10-2011 08:34 PM

Can  you please tell me where i can find an example of settilng gamma for a bar created using the API? Lets say i want to have the bar rotated 30 degrees how would i go about that?

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,604
Registered: ‎04-26-2010

Re: setting gamma using the API

11-10-2011 11:57 PM in reply to: ethor

Dim Bar as RobotBar

.......

Bar.Gamma = 90

 

 

 

http://forums.autodesk.com/t5/Autodesk-Robot-Structural/About-the-SDK-application-for-Optimization-u... -> Robot Api.pdf -> page 579, 581



Rafal Gaweda
Please use plain text.
Active Contributor
ve_75
Posts: 34
Registered: ‎06-23-2013

Re: setting gamma using the API

08-21-2014 01:28 AM in reply to: Rafal.Gaweda

Hi,

 

I tried to change the gamma value as you said, but i didn't manage to...

Is it possible to get a more complete part of code please?

 

Kind regards,

 

 

Please use plain text.
Product Support
Artur.Kosakowski
Posts: 5,115
Registered: ‎12-17-2010

Re: setting gamma using the API

08-21-2014 04:21 AM in reply to: ve_75

          RobotBar bar = r.Project.Structure.Bars.Get(1) as RobotBar;

          bar.Gamma = 30;

 

-----

 

          RobotBarSection sec = bar.GetLabel(IRobotLabelType.I_LT_BAR_SECTION) as RobotBarSection;

          RobotBarSectionData sd = sec.Data;

          sd.SetValue(IRobotBarSectionDataValue.I_BSDV_GAMMA, 30);

          r.Project.Structure.Labels.Store(sec);

 

If you find your post answered press the Accept as Solution button please. This will help other users to find solutions much faster. Thank you.



Artur Kosakowski
Please use plain text.