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 ?
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
No you have to create steel section and assign material to it.
I will post example code.
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
assigning material : http://forums.autodesk.com/t5/Autodesk-Robot-Structural/C-API-help/m-p/3555274/highlight/true#M6417 - message 7
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 ?
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.
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).
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
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.
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.
With standard material this works.
I will check user material
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)
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...
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
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
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.
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,
-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
I need the syntax of the basic objects in steel design or a link to documentaion about it .