First attempt Editing a Python script

Hi All,

For those of you who are interested, here’s my final Dynamo script.


Assemblies_ModifyOrigin_v04.dyn (5.7 KB)
I wrapped the Python script and “Element.LocalCoordinateSystem node” inside a custom node (local package).
Assemblies.ModifyOrigin.dyf (26.0 KB)
The script reads out the orientation of the (assembly) source elements, and uses that to rotate the origin of the assemblies. If you create assembly views (after running the script) these views are aligned with the element, regardless of the rotation of the element in the project. Without running the script assembly views are always aligned with the X, and Y-axis.

@Daniel_Woodcock1: Thanks a lot for providing the initial scripts.
https://forum.dynamobim.com/t/assembly-modify-origin/11433/7?u=mjb-online
@Dieter_Vermeulen: Thanks a lot for the “Element.LocalCoordinateSystem” node.
@kennyb6, @Petar_Penchev1, @viktor_kuzev, and @Steven thanks a lot for your effort to help me, and pointing me in the right direction.

Kind regards,
Mark

14 Likes