Robot to revit bar numbers

Hi,

I was just wondering if it is possible to use dynamo to extract the bar numbers of the members from a robot model into a parameter (possibly the ‘mark’ parameter) of the corresponding members in a revit model. (I’ve initially used the robot to revit link to get the model from robot to revit)
Any suggestions would be much appreciated, as it isn’t possible to do this using the link tool.
Thanks

Hi Mark, I’m pretty sure that what you’re after is possible using Python for retreiving the results and barnumbers from Robot to Dynamo using below initiation, this works for the Robot project currently open:
# add Robot Structural Analysis API reference
from System import Environment
#get the current user folder i.e C:\Users<you>\AppData\Roaming
user = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
# add the reference to the interop file shipped with the package
clr.AddReferenceToFileAndPath(user +r"\Dynamo\Dynamo Revit\1.3\packages\Structural Analysis for Dynamo\bin\RSA\interop.RobotOM.dll")
# add needed import to be able to use Robot Structural Analysis objects
from RobotOM import *
from System import Object

Has someone managed to do that? I was trying to get the workflow to work:

Revit -> Robot (using direct link) -> Analyse -> Get Bar numbers back to Revit.
Based on the bar numbers using Robot & Result Connect -> feed Revit with EXCEL design data

Thank you in advance.

Bart

Hi Bart

I’m sure it is possible, must admit i have not used results-connect for excel… but it is possible to access the interop as I write in my post and through that pull both geometric information as well as results and bar data etc from RSA. You would however need to make sure that the bar numbers have not changed from Revit to Robot (they are not using the same numbering system) and when that is done make sure the columns/beams your exchange/change does not loose connections and that they are not hosting other elements.

To sum up, it is no easy feat :slight_smile:

I’m not sure if this is what you’re after:
image
The output is in fact the bar-numbers, though I do not see what you will use them for.

Code:

#Import libraries
import clr
# add Robot Structural Analysis API reference
from System import Environment
#get the current user folder i.e C:\Users\<you>\AppData\Roaming
user = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
# add the reference to the interop file shipped with the package
clr.AddReferenceToFileAndPath(user +r"\Dynamo\Dynamo Revit\1.3\packages\Structural Analysis for Dynamo\bin\RSA\interop.RobotOM.dll")
# add needed import to be able to use Robot Structural Analysis objects
from RobotOM import *
from System import Object
#Create empty lists
app = RobotApplicationClass()
#Define output
barnums = []
#Connect to Structure server of Bars and Labels.
bars = app.Project.Structure.Bars.GetAll()

for i in range(1,bars.Count+1):
	barnums.append(bars.Get(i).Number)
OUT = barnums

Jonathan,

Thank you for your input, much appreciated.
I was reading Robot bar numbers and data using a Results Connect - excel add-in but Python script works smoother so that’s great. Yes, it is what I wanted but only a first step. The next would be to how to match RevitID with the bars numbers.

Maybe it would be easier if I describe specific example:

  1. Model created in Revit. RC columns, slabs, beams etc. Lets say one of the column Revit ID = 0001
  2. Model exported to Robot and analysed - the same column has bar no =101 and axial force equals to 435 kN
  3. Using Excel I’m adding 10% contingency and rounding up to closest 25 so 435*1.1=478.5 round up = 500 kN
  4. Write down the axial force information back to Revit as parameter to the correct column (ID=0001)

The easiest way of doing that would be to map the location of the elements in Revit and compare them to the elements location in Robot, and thus create a link between Bar A in Revit and Bar 2 in Robot.

The shown method can be used for this also, simply capture the start and endpoints of each bar using:

bar = bars.Get(i)
barnums = bar.Number
sn = app.Project.Structure.Nodes.Get(bar.StartNode)
en = app.Project.Structure.Nodes.Get(bar.EndNode)
output.append([barnums, sn.X, sn.Y, sn.Z, en.X,en.Y,en.Z])

OUT = output

Hi there,
I just read this and i’m actually in the same position.
Did you find a way to link the bar id in Revit with the bar ID in Robot? How to?

Any help will be much appreciated

Thank you

No Unfortunately it is not implemented. Please vote up for this.

https://forums.autodesk.com/t5/robot-structural-analysis-forum/revit-amp-robot-ids-mapping/td-p/5838185

https://forums.autodesk.com/t5/robot-structural-analysis-ideas/revit-amp-robot-ids-mapping/idc-p/6272631#M1491