Placing Railings on DWG File

Hello all

Wondering if anyone would be able to help me. Trying to place railings on a CAD file that I have imported and coming up with an error.

Can you tell us what the warning is?

What package is the Railing.ByPathTypeAndLevel from?

Is your railing type/family pretty simple? (for example, number and location of balusters or vertical posts?)
Also, is the DWG information that you are attempting to feed the Railing.ByPathTypeAndLevel, pretty “clean”? No overlapping lines, extremely short segments, etc…

If not, I could see Revit trying to make a railing and getting confused with all that geometry.
Can you, through the UI, pick segments of the DWG as the path and get Revit to make a railing? If not, it’s unlikely that Dynamo will be able to handle it either. For example, it appears that some of the line segments make a “T” or some other disjoined shape. If you are not feeding the Railing node only continuous lines, you will probably get an error (see below my silly example from within Revit)

You will probably also need to do some pre-processing of the CAD curves you get from that node- grouping continuous curves, etc- unless you want a railing for each line segment you get.

Also, my first try would use an extremely simple railing family- maybe only a top rail and no other geometry and work up from there.

Hello Jacob!

This is the warning that comes up…

Hello Joe!

Yess! The type is rail type and I do think some lines overlap in the DWG file. I just want to save myself some time and I don’t mind if I have to place a few after on the curve elements.

As you can see by the image its a traditional fencing

To provide direct guidance we need the text above the node or from the graph node manager, not the warning documentation.

We can tell from this that you are providing the wrong data type. An example of this is a node expecting a Revit element, but you sending the string representation of an element id into an input, or perhaps in this case providing a RevitDB.Element instead of a Revit.DB.RailingType element. Can’t see a specific direction without the specific error though.

1 Like

hi @george.wardle , u are using the right method and it’ll work as well there’s just 1 issue in this.
The Input that u giving as path is not right as it is supposed to be polycurves here’s a working example for your reference :metal:, do mark it as solution if it resolves your issue and cater your exact issue.
Regards,
BM

3 Likes

Thank you Bharat!

1 Like

I would like it to incorporate CAD later names. Would that be possible?

I can’t find Element.LocationCurve either? sorry

Hi @george.wardle That Particular one is coming from a package “DynaMEP”

and also if u don’t wanna use it u could use Element.geometry as well in this case

For the CAD layer names u can use those but u need to make sure the input going to the final node needs a Polycurve

2 Likes

Thank you so much!! I am slowly getting there all new to dynamo and codes in general. One last question will it work for multiple lines as I see you only have one?


Here, but u need to keep connected lines in different lists. This is just a general example i quickly did for u, please keep connected lines in one list and it’ll work.

All the very best @george.wardle

Cordially,
BM

1 Like