Rotating columns placed by dynamo

Hi, I am trying to set up a script for replacing square columns into another style of column (i make it by family).

As the square columns are solid drawn by civil3d, now I have broken it down into lines and put them into revit for transformation. The script I wrote aims to find out the center point and the direction of the square columns, then the family should be placed base on the above parameters.

However, the family can just be placed correctly according to the center point and the direction has got wrong.

Anyone knows where the problem is? Thanks in advance!!

Link included the script the revit file and the family

Hi Bert,

Link doesn’t have rvt file.

sorry i have put an incorrect link. Here is the correct one.

I am not sure you can set the rotation programmatically in that manor. Try to set the cross section rotation parameter value instead.

1 Like

Do columns have a cross-section rotation? Looking through the parameters of the family, can’t find one called that. I know beams do, but not showing up for this.

Would using a Transform class work in this case?

1 Like

It requires Column Style to be Slanted to reveal Cross-Section Rotation.


It appears his column doesn’t have the column style option. Any clues on how to get it in it?

@kennyb6 the column has to be a Structural Column. The one provided is an architectural column.


1 Like

The family has been replaced by a structural column and i have change my script to adjust the cross section rotation.

Unluckily, the columns still not rotate well

capture of the result of my rotation

I used flattens just for safety but the big issue is with the vector.AngleWithVector node: If instead you use Vector.AngleAboutAxis you force dynamo to calculate the angle on the XY plane (its normal is the Z). (You can see the angles are sometimes different between the two nodes, maybe because the vectors do not lay on the XY plane)