We are a manufacturer of precast concrete stairs.
Since the Builtin Revit Stairs have a lack of possibilities we build our Families as Generic Models.
Right now we are looking for ways to automate the generation of views for our shopdrawings.
We are focussing on Assemblies, as they seem to have the most advantages. But by default there is also a big disadvantage, witch is the orientation. If a family instance has a rotation (not aligned to the X or Y-axis), the views are not aligned to the family instance, but to the X or Y-axis (see picture 1).
Assemblies do have their own Assembly Origin wich can be manipulated by Python.
In the thread below @daniel_woodcock1 was kind enough to share a Python script that can rotate the Assembly Origin.
import clr import math clr.AddReference("ProtoGeometry") from Autodesk.DesignScript.Geometry import * clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument app = DocumentManager.Instance.CurrentUIApplication.Application clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) clr.ImportExtensions(Revit.GeometryConversion) clr.AddReference("RevitAPI") from Autodesk.Revit.DB import * def tolist(obj1): if hasattr(obj1,"__iter__"): return obj1 else: return [obj1] elems = tolist(UnwrapElement(IN)) axis = tolist(IN) rot = tolist(IN) outList =  for e, a, r in zip(elems, axis, rot): trans = e.GetTransform() transRot = trans.CreateRotationAtPoint(a.ToXyz(),math.radians(r), trans.Origin) try: TransactionManager.Instance.EnsureInTransaction(doc) e.SetTransform(transRot) TransactionManager.Instance.TransactionTaskDone() outList.append(e) except Exception, e: outList.append(e.message) OUT = outList
I used this Python script in my Dynamo workflow (also attached below).
After running it the Assembly Origins are rotated correctly, and the orientation of views is also correct.
But the centerpoint of the Assembly Instance seems to be no longer the basepoint for the created views (see picture 2).
Does anyone know why this is happening ?
Thanks in advance,