Rotate selected columns to a specific degree

#1

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.

0 Likes

#2

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

#3

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

Dropbox link with image and .dyn file attached

0 Likes

#4

@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.

2 Likes

#5

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.

0 Likes

#6

@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

3 Likes

#7

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

0 Likes

#8

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

1 Like