I want to rotate a specific family through a specified axis. I have developed a script but it is not working. Can any suggest any solution?
You’re converting the family to dynamo geometry and then rotating it, is that what you want?
If you want to rotate the family itself you can try to use the “Rotate Family” node from the archilab package.
I have tried using both set rotation and rotate family. The set rotation works only through one axis and rotate family is not working.
I see your using WarningElement.Id. That’s not what you want. Just use a code block and type this.
Feed that into Rotate Family.
Now also not working.
Can you confirm that the element is able to rotate that way? Depending on hosting or reference plane the element may not be able to rotate.
To add onto what Nick said, there are several things you need to check to see if your family can rotate on the chosen axis.
For example, if it’s floor hosted, it can only rotate on the z axis, if it’s wall hosted, it will only rotate on the axis perpendicular to the wall, etc. You can also try unchecking “always vertical” and “workplane based” from the inside the family.
I tried with “Tee - Generic”. While using set rotation it is rotating along z axis i guess. (I placed in plan view and its rotating). When i am using rotate family i used all three axis but still don’t working. Can you upload a family you think that will work, i will check it and reply.