Create Columns from CAD file with the same orientation

Hii everyone,
I’m trying to create a dynamo script that create grids and structural columns in Revit by linking a CAD file and use the columns locations and orientation in cad to create those columns, every thing goes in right way, except the rotation of columns, i’ve tried using the nodes of " Set Column Orientation" and “Geometry.Transform” but with no luck, attached below an images for clarification… Please any help ?

Column and Axes.dwg (36.0 KB) Columns and axes.dyn (144.5 KB)
Test.rvt (1.9 MB)

Any help please?
@Kulkul, @Marcel_Rijsmus,

I have Also Tried to edit the script again and have resolved most of the problem except some columns still have orientation don’t match with columns from cad file

Column and Axes.dwg (36.1 KB) Columns and axes.dyn (164.4 KB)

You might create columns in cad as blocks and extract it’s location (x,y) and it’s rotation from cad (Export data) and feed this to dynamo via excel so now you are able to place your columns as you have the placement points and the rotation angles.

thanks a lot for your response, but i think we can find a better solution by dynamo instead of CAD data extraction because that method needs more working process on the CAD file such as convert each column to a block plus when we do that each block will has a rotation of zero otherwise i should place the column block manually then set its rotation individually in CAD file, i think it’s a long duration process

You are right but I use this way 2 years ago when I have already the cad drawings not to create it specially for this task. Did you give Bimorph package a try ? it deals with the cad so well.

Could you clarify if you have already the CAD drawings ( for example CAD drawings comes from other firm with no blocks created), how could you create a blocks for each column type and get the rotation of the block without individually place the blocks and align them to the old columns

The drawings were already have the blocks made by the draughtsmen I only extract the data for the suitable block type. If you don’t have it or you might see it will waste time give a try for bimorph nodes it might help.

Thanks a lot, I’ve already use it as shown in my graph but it couldn’t extract rotation from poly-lines

Done, :smile: :smile: I’ve Solved the problem, every thing goes in right way now

Well done . Would you share your solution ?

sure, the dynamo script goes following the below sequence
1- filtering the layers from CAD to get the objects (Columns polylines) from required layer name
2- Create a surface the poly lines corner points after resorting them in a certain sequence (for example in clockwise direction) in order to catch the long or short members of the surface perimeter curves for each column then get that member direction, Now you have the the CAD columns orientation.
3- Create Revit columns using the sufaces centroid points and desired top and bottom levels
4- Get Revit columns perimeter curves
5- Get the Revit Columns orientation by the same way used for CAD Columns.
6- Get the Angle between CAD Columns and Revit Columns
7- Finally, Set the column orientation using the above mentioned angle.

1 Like

Well Done … Good luck.

1 Like

hey,can you send the dyn document again?The document is broken now.Thanks!

would you please upload you dyn file to help us

Please share your script it was very helpful for my project

Hi ingenieroahmad
Please tell me which package have the " Number.ToInteger" it was very helpful for my project
Thanks in advance

You might use OOB node ceiling or flooring to round or down your number.

You can use the node " math.Round" with zero digits

Thank you so much abdallahzakaria
Thanks for your information its working
If it is possible Please share your column script it was very useful for my project
Thanks in advance