Rotate selected columns to a specific degree

I can’t seem to get dynamo to work with Revit with the simplest of actions. All I want to do is rotate selected columns to a specific degree. I get this when I activate Run;

Warning: No function called SetRotation on a Revit.Elements.StructuralFraming that takes __array,int could be found

Is my dynamo working correctly? I did everything just as the tutorial did but can’t get it to perform.

Hi @STEVEHATCHER please see this post on getting help from this forum :slight_smile: How to get help on the Dynamo forums your post should be titled something more relevant/descriptive to what you are trying to achieve.

If you could please share an image of your graph so we can see what you are working on using the “Export Workspace As Image” button in Dynamo circled in red:

You may not be able to upload images yet as you are a new user, but can use an upload service like dropbox or google drive; uploading and sharing your .dyn file will be useful for others to help as well.

Also a link to the tutorial you are following would be of use!

4 Likes

Thank you. I will name all future posts more descriptive of the content.

Dropbox link with image and .dyn file attached

@STEVEHATCHER Just had a look, and here are some relevant threads on achieving rotation of columns I found searching the forum:

It seems that columns rotation is based upon the value of the parameter “Cross-Section Rotation”. This parameter becomes available when a column’s “Column Style” is set to “Slanted - Angle Driven”.

image

To rotate the columns with Dynamo, first use the Element.SetParameterByName node to change the column’s style from “Vertical” to “Slanted - Angle Driven”. This parameter value is an enumeration, so the values are as follows:

  • 0: Vertical
  • 1: Slanted - Angle Driven
  • 2: Slanted - End Point Driven

You will notice the numerical values for these Column Styles correspond with the order they are listed in the drop down when selecting the value in Revit.

After you’ve used the Element.SetParameterByName node to change the selected column’s “Column Style” to “Slanted - Angle Driven” or 1, the columns will have the parameter Cross-Section Rotation, which you can then use to modify their rotation with the same Element.SetParameterByName node - in your attached example to 30 degrees. Once you have rotated the columns you can then set their parameter values for Column Style back to vertical.

5 Likes

Here is a link to the video I watched. This guy’s way of doing it seems a lot more simple. But I can’t duplicate it on my end.

@STEVEHATCHER yes it appears that method works with Architectural Column families, not with Structural Column families. The error you were given tells me that you are trying to run the graph with Structural Columns and not Architectural Columns. Try selecting one of the elements in Revit and seeing whether or not it is a Structural Column or an Architectural column (left shows architectural column returns the category “Columns” while a structural column returns the category “Structural Columns”):
image

4 Likes

Ahh, I see it now. Thank you for your time.

No problem! The method I described/showed above will work with your structural columns :slight_smile:

1 Like

@awilliams hi,
I have same problem, but difference is I am trying to rotate a custom family(a generic model).
I want to rotate using degrees. but same problem occurred. It seems that problem is in the family, but I can’t find out what, which parameter is missing in my family. it would be helpful if you could point that out

Could you maybe make a new topic showing what you have so far with some screenshots and maybe even your dyn file / revit file?

Hey Steve… i had also faced same issue… and search alot to make that script error free and easier.
here is a video. hope this might help you. Rotating Revit Structural Column with Dynamo - YouTube
from this problem l learned that every problem has solution, need to find out our way through things…