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: 

Robot Open Standard : defining a steel rectangular custom section API

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
guillaumeniel
1642 Views, 21 Replies

Robot Open Standard : defining a steel rectangular custom section API

Hi,

I would like to define a steel rectangular custom section (not hollow) with ROS, and then define a custom material for it (I am using fabric sections).

 

Here is my script, for a concrete section : 

 

section.ShapeType = IRobotBarSectionShapeType.I_BSST_CONCR_BEAM_RECT
Dim concrete As RobotBarSectionConcreteData
concrete = section.concrete
concrete.SetValue(IRobotBarSectionConcreteDataValue.I_BSCDV_BEAM_B, 0.5)
concrete.SetValue(IRobotBarSectionConcreteDataValue.I_BSCDV_BEAM_H, 0.5)

 

What is the conversion for a steel section ? Do I only have to replace concrete by steel ? Also, how can I define the material for this section ?

21 REPLIES 21
Message 2 of 22

No you have to create steel section and assign material to it.

I will post example code.



Rafal Gaweda
Message 3 of 22
Rafal.Gaweda
in reply to: Rafal.Gaweda

    Dim RLabel As RobotLabel
        
    Dim RLabelData As RobotBarSectionData
    Dim RLabelNSData As RobotBarSectionNonstdData

    Set RLabel = RobApp.Project.Structure.Labels.Create(I_LT_BAR_SECTION, "my_section")
    Set RLabelData = RLabel.Data
    
    RLabelData.Type = I_BST_NS_RECT
    RLabelData.ShapeType = I_BSST_RECT_FILLED

Set RLabelNSData = RLabelData.CreateNonstd(0) RLabelNSData.SetValue I_BSNDV_RECT_B, 0.2 RLabelNSData.SetValue I_BSNDV_RECT_H, 0.4 RobApp.Project.Structure.Labels.Store RLabel

 rectfill.jpg



Rafal Gaweda
Message 4 of 22
Rafal.Gaweda
in reply to: Rafal.Gaweda

Message 5 of 22

Thanks Rafal,

But it is quite impossible to find this in the Robot API pdf Guide (I_BST_NS_RECT is not mentioned for exemple in the hole document). How can I find this kind of information ?

 

Is it possible to create a Robot File using the graphic interface, and then save it in a API format to see how the script is ?

 

 

Message 6 of 22


But it is quite impossible to find this in the Robot API pdf Guide (I_BST_NS_RECT is not mentioned for exemple in the hole document). How can I find this kind of information ?

 

It is not clearly seen in documentation. Page 2125 in Robot API.pdf.

 

Is it possible to create a Robot File using the graphic interface, and then save it in a API format to see how the script is ?

 

No there is no such possibility.

You can only write your won API code which gets data from robot and check values, enum values.



Rafal Gaweda
Message 7 of 22

Hi,

I still have on question : I would like to assign material to the section and not to the bar (like when using material icon).

So can I use Robot.Project.Structure.Section.Get(section).SetLabel(IRobotLabelType.I_LT_MATERIAL, material)

 

instead of Robot.Project.Structure.Bars.Get(i + 1).SetLabel(IRobotLabelType.I_LT_MATERIAL, material) ?

 

I need to do this because when I assign material directly to a bar, I can't see in the material manager the custom material defined. It does not appear in any tab (steel, concrete, Aluminium, Wood or Other).

Message 8 of 22

    Dim RLabel As RobotLabel
        
    Dim RLabelData As RobotBarSectionData
    Dim RLabelNSData As RobotBarSectionNonstdData

    Set RLabel = RobApp.Project.Structure.Labels.Create(I_LT_BAR_SECTION, "my_section")
    Set RLabelData = RLabel.Data
   
    
    RLabelData.Type = I_BST_NS_RECT
    RLabelData.ShapeType = I_BSST_RECT_FILLED
    
    Set RLabelNSData = RLabelData.CreateNonstd(0)
    
    RLabelNSData.SetValue I_BSNDV_RECT_B, 0.2
    RLabelNSData.SetValue I_BSNDV_RECT_H, 0.4
    
    RLabelData.MaterialName = "S355"
    
    RobApp.Project.Structure.Labels.Store RLabel

 



Rafal Gaweda
Message 9 of 22

Hi,

It does not work. Here is my script to define different materials :

 

Dim materiau As RobotMaterialData
For i = 0 To tabMat.GetLength(0) - 1
Label = Robot.Project.Structure.Labels.Create(IRobotLabelType.I_LT_BAR_MATERIAL, tabMat(i, 3))
materiau = Label.Data
materiau.Type = IRobotMaterialType.I_MT_OTHER
materiau.E = tabMat(i, 2)
materiau.NU = 0.3
materiau.RO = tabMat(i, 1)
materiau.Kirchoff = materiau.E / (2 * (1 + materiau.NU))
Robot.Project.Structure.Labels.Store(Label)
Next

 

And here is my script to create sections and assign material



Dim section As RobotBarSectionData
Dim toile As RobotBarSectionNonstdData
For i = 0 To tabElts.GetLength(0) - 1
Label = Robot.Project.Structure.Labels.Create(IRobotLabelType.I_LT_BAR_SECTION, "Toile " & i + 1)
section = Label.Data
section.Type = IRobotBarSectionType.I_BST_NS_RECT
section.ShapeType = IRobotBarSectionShapeType.I_BSST_RECT_FILLED
toile = section.CreateNonstd(0)
toile.SetValue(IRobotBarSectionNonstdDataValue.I_BSNDV_RECT_B, tabElts(i, 3))
toile.SetValue(IRobotBarSectionNonstdDataValue.I_BSNDV_RECT_H, tabMat(tabElts(i, 4) - 1, 0))
section.MaterialName = tabMat(tabElts(i, 4) - 1, 3)
Robot.Project.Structure.Labels.Store(Label)
Next

 

I don't get any error message. In Robot, I can see in the material window that my new materials were created (1002Sc, 1002St,...), but my new sections (Toile 1, Toile 2, ...) are still defined with a steel material.

 

capture

 

 

And also, in the material manager, I can't find the new materials(neither in Steel tab, nor concrete, Aluminium, Timber, Other). 

It works if I assign material to the bars, but that is not what  i want to do.

Message 10 of 22

With standard material this works.

I will check user material

 

s355.jpg



Rafal Gaweda
Message 11 of 22

In this case material must be saved to database also

(corrections in red , below)

 


materiau.Type = IRobotMaterialType.I_MT_STEEL
materiau.E = tabMat(i, 2)
materiau.NU = 0.3
materiau.RO = tabMat(i, 1)
materiau.Kirchoff = materiau.E / (2 * (1 + materiau.NU))

 

materiau.SaveToDBase()


Robot.Project.Structure.Labels.Store(Label)

 



Rafal Gaweda
Message 12 of 22

Hi,

By adding 'materiau.SaveToDBase()', the new material now appears in the material manager, under "Others". But I still have a problem because the material is not assigned to the section, ie the 'section.MaterialName = tabMat(tabElts(i, 4) - 1, 3)' command does not have any effect...

Message 13 of 22

Are you sure tabmat is declared and used properly?



Rafal Gaweda
Message 14 of 22

I found my error. I still used materiau.Type = IRobotMaterialType.I_MT_OTHER instead of materiau.Type = IRobotMaterialType.I_MT_STEEL

 

Now it works.

 

Thanks

Message 15 of 22

Yes, I also tried by replacing tabmat by a string. Cordialement Guillaume Niel Envoyé depuis mon mobile
Message 16 of 22
bouboutcpge
in reply to: guillaumeniel

Hi every one , 

I have a to calculate the cost of different rectangular steel frames and see the effect of geometry and loads on the total cost of the frame . I've got 60 possible geometric configuartions and 20 load cases it makes 1200 file to create, calculate and get result (steel profile ex HEAXX) into a excel sheet to calculate the cost . Any Help to create VBA connection , thank you guys a lot 

Message 17 of 22
Rafal.Gaweda
in reply to: Rafal.Gaweda

We can help you but you have to ask precise question.
My answer is : yes, I guess it is possible to do it by API.



Rafal Gaweda
Message 18 of 22
bouboutcpge
in reply to: Rafal.Gaweda

Hi, 

   First thanks for the replay, the inputs are :

-Geomertry : Length L vary  [2,32] m , witdh l of the frame for the slenderness ratios as a parameter ex : l/L=1 ---> l/L=0,25  

-Load : linear dead load  ex: 20t/ml

-profile range : HHEA, 

frame.png

-Optimisation criterea : stell mass

Outputs to excel :

- results in the same line as the inputs to calculate the cost

And thank you again for your time

 

Message 19 of 22
Rafal.Gaweda
in reply to: bouboutcpge

And where is the question?


Rafal Gaweda
Message 20 of 22
bouboutcpge
in reply to: Rafal.Gaweda

I need  the syntax of the basic objects in steel design or a link to documentaion about it .

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

Post to forums  

Autodesk Design & Make Report