I have a problem with the origin orientation of assemblies created. This orientation is affecting all the assemblies views created because the elevations and plan views will not align with the elements main face(normal). Is there a way in dynamo to get the origin and alight the orientation with the wall orientation that is part of the assembly?
I really hope this can be done by Dynamo (a little Python magic maybe).
If the rotation of the elements could be added as input to the assembly (steam)nodes of @Julien_Benoit1, would be the best option if you’d ask me.
Hope someone crack’s this one.
Wow… this is great, thank you very much.
An Assembly is a great tool for manufacturers who create their shopdrawings this way.
And that’s why i really don’t understand the family/element rotation isn’t done by Revit on default.
But this is a great way to change it afterwards.
Does the script only work for one element, or does it allow input of a list aswell.
Thanks again.
The script handles multiple assemblies, but list lengths for each input have to be the same, you can use the list.cycle node if you have a common input value (say the rotation axis will in most cases be the Z azis).
This doesn’t automate the rotation angle, I have left that to be done with your own logic outside of the node as it give you more freedom to choose which direction you want it.
You could couple this up with any create assembly node that returns the assembly just created in Dynamo and rotate the transform in one hit.
For completeness (as I really didnt fully answer the Question as I was pushed for time) I have added a few additional nodes in this script to help modifying the Assemblies Transform. These include the following Post Assembly Creation Utils:-
RotateOriginAboutAxis (as above)
** Rotates the Assemblies Transform about the specified Axis by the specified Rotation in degrees.
OrientToFace
** Orient/Relocates the Assemblies Transform to the Location of a Point on the Given Surface.
OrientToPlane
** Orient/Relocates the Assemblies Transform to the Location of a Point on the Given Plane.
MatchTransform
** Matches the Assemblies Transform to the Transform of another Element. @john1, this will probably be more suitable for your case.
The scripts all look good, but I cant get the last one to work or maybe I don’t quite understand what it does yet. I did get the rotate around axis one to work
Does the last script look at the element and give the assembly the same rotation as the element ? If so , if your element-input is a random element (cycled by 4 in this case) and the assembly input 4 different assemblies (with different rotations in the project) is the outcome that all 4 assemblies should have the same rotation ?
I’ve used your node (RotateOriginAboutAxis) and it helps a lot, but know I stumbled across a problem where it looks like the set rotation isnt rotating along the assemblies location point. So the assembly-origin is rotated but is not in the same place, which means the section A and section B view of assembly dont create the views.