Having placed generic model families along a spline in rvt using dynamo, can I rotate the family (or maybe the dynamo xyz) such that families remain perpendicular to the spline path?
thanks zach.
Unfortunately we don't yet have a rotate node for families (it is on our internal TODO list), but you can add a rotation instance parameter to your family that moves the geometry and use a Set Family Instance Parameter to manipulate it.
If it is a Generic Model Point Based you could also add a point to serve as a rotation pointer
Russ,
Hereās an example of how to achieve what you are asking for with Dynamo:
http://autodeskvasari.com/forum/topics/rotate-generic-family-with-dynamo
-K
Hey Gents
I am using the demonstration and getting the following error in the Python script.
Traceback (most recent call last):
File ā<string>ā, line 25, in <module>
TypeError: Line is not Iterable
All my Watches are showing as passing correct datatypes and so on, so I am not sure of the exact issue as I am not familiar with Python. Any thoughts would be welcome.
Ā
Ā
Adam,
Itās because your input was a single item and not a list. I fixed that in the node and published it to the Package Manager. Please download the latest version and your error will go away.
Thank you,
-K
Thanks Konrad!!
Worked perfectly, I should have realized it was a list issue since it pops up as a list DataType and not being Iterable.
One of these days I should familiarize myself with Python!!
Hello, I am new to dynamo so excuse this question, when you say āPlease download the latest version and your error will go away.ā do you mean Dynamo or a library? If a library, is it on GitHub? If Dynamo, I am using the latest version of Dynamo and see no reference to Rotate Familyā¦
Hello Chris Mckeown,
I think Konrad is talking about new version of Package Manager which he has published.
Thanks,
Riteesh
Iāve just noticed these updates. Apologiesā¦didnāt tick the notify by email box.
Great work!
Hey Konrad, I canāt seem to get the Rotate Family node to work. I am feeding it an element ID, an axis (which I understand is a line, typically straight up and down in the Z-direction if Iām rotating in Plan view), and an angle, which Iām converting to radians. For some reason it doesnāt seem to want to work. Iām in a project environment in Revit 2015, running dynamo v 0.7.5.3566
Ā
I appeciate the help!
Josh,
Is that Element.Id node from Clockwork package? I think its output is not an ElementId but a integer value representing an element id. These two are different. Please use Element Id node from Archi-lab package. It should work then.
Ps. I will fix the rotate node to make sure that it works with integers too. Itās my bad.
Ā
No, itās the built-in node that returns integers:
Itās actually two other things:
First, Konradās node expects a list of items (a list of axes, a list of element IDs and a list of angles), you are supplying single elements. Secondly, youāll need to add two lines of code into the python script that is contained in the node (anywhere before line 25 should be fine):
clr.AddReference("RevitNodes") import Revit
Love it! You guys know my nodes better than me. I will fix that stuffā¦one day. Thanks Andreas!
Andreas, Josh,
I updated that Rotate Family node and re-posted to Package Manager. It should be working fine now.
Good luck!
Hi All,
Itās interesting using this node, it points out a couple of reasons why we didnāt put in this functionality āout of the boxā because of some of the somewhat hidden complexities of the seemingly simple operation. They are managable issues, and itās awesome to have it, and a big thanks to Konrad for doing it. Just pointing out some logical gotchas
-
Family Rotation isnāt a parameter of the family, rather, itās an adjustment that you make at the time of placement of the family. So if I rotate the family 45 degrees and then make an adjustment of my rotation parameter to 46 degrees, I end up with a rotation of 91 degrees relative to the original placement. This is pretty different than adjusting a rotation parameter of the family itself where a change from 45 to 46 degrees would result in a CHANGE of 1 degree.
-
The idea of an Axis is very different in Revit versus most other applications. Here, the node is asking for a Line instead of a vector, which seems sensible in terms of how the Revit interface asks for some things, but different than the general geometric environment of Dynamo. This could be handled in the node, of course, to take a centerpoint of rotation and a vector, then converting that into a line to feed the Revit API.
-
Degrees v radians. Revit API deals in radians, most peopleās heads deal with degrees, and default behavior for Dynamo calculations are in degrees. Again, this can just be a choice by the node developer about including a conversion factor in the node itself
One other thing that I think is a bug; If I put in a rotation of 0.1, run, then change the rotation to 0.0, if I just start hitting Run over and over, the family will keep rotating by 0.1. It seems to hold on to the last non-zero angle.
Ā
Zach,
These are all valid points. I am very aware of this and made sure that users are too by posting those exact same comments on my download page when the node was originally created in 0.6.3 version:
Ā
And also later when I updated it for the 0.7.1 version:
I personally built in a check for what my desired angle was vs what the current state of the family rotation is and only fed the difference into the Rotate node. I understand that this might be somewhat of a burden for newer users, but I am confident that they can figure it out. Maybe this node should come with a disclaimer that its for advanced users only. Thanks for looking at it.
Konrad, you are right. I went to your page here:
And copy and pasted the top sections where they matched. That fixed the problem. Really wierd. Only thing I could tell is that the color of the āProtoGeometryā changed to yellow. It didnāt appear to have any extra indents or spaces.
Thanks for the reply.
Josh,
It has changed to yellow because thatās the indication that its a String. Any string has to be enclosed in either āsomethingā or āsomethingā for Python to recognize it as a string. I am not sure why quotation marks for stripped from code that I posted.
Is there any way to convert an integer into an element id?