Defining stories through Dyanmo

evyaw12
Explorer
Explorer

Defining stories through Dyanmo

evyaw12
Explorer
Explorer

Hello!

 

I am trying to automate the making and analysis of a simple steel structure through Dynamo and Robot. However, to conduct seismic analysis, it is required to define stories. I have tried to find resources that could help me understand what I'm missing but I can't find a solution.

 

Any help or advive would be greatly appreciated!

0 Likes
Reply
Accepted solutions (1)
228 Views
1 Reply
Reply (1)

Stephane.kapetanovic
Advisor
Advisor
Accepted solution

hi @evyaw12 

first try reading the "Robot API 2024" guide on page 1049 about the methods of the IRobotStoreyMngr interface
use Create2 or Create2Ex.

Sub CreateStorey()
  Dim RobApp As RobotApplication
  Set RobApp = New RobotApplication
  
  Dim Storeys As RobotStoreyMngr, Storey As RobotStorey, StoreyNumber As Long
  Dim StoreyName As String, TopLevel As Double, ListObjects As String, ColorIndex As Long
    
  Set Storeys = RobApp.Project.Structure.Storeys
  Storeys.BaseLevel = 0
  
  ' Method Create2
  StoreyName = "MyStoreyName": TopLevel = 5.2: ListObjects = "1to10 20to30": ColorIndex = 1
  StoreyNumber = Storeys.Create2(StoreyName, TopLevel)
  
  ' Method Create2Ex
  StoreyNumber = Storeys.Create2Ex(StoreyName, TopLevel, ListObjects, ColorIndex)
  
  ' Access to a storey
  Set Storey = Storeys.Get(StoreyNumber)
  With Storey
    .Objects = ListObjects: .Color = ColorIndex
  End With
  
  Set RobApp = Nothing
End Sub

Best Regards

 

 

See Also : https://forums.autodesk.com/t5/robot-structural-analysis-forum/robot-structural-analysis-api-python/...