Sorry but how would I go about amending this so that it takes a list of lines (3 lines one for each dimension) and 3 lists of elements to be dimensioned?
I thought I could create a custom node and just change the lacing but that doesn’t work. How does lacing working with Python nodes within a custom node? Is this possible or is it best to modify the Python itself?
Thanks
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc=DocumentManager.Instance.CurrentDBDocument
line = IN[0].ToRevitType()
elements= IN[1]
dim=0
elementsRef=ReferenceArray()
opt=Options()
opt.ComputeReferences=True
opt.IncludeNonVisibleObjects=True
opt.View=doc.ActiveView
for element in elements:
elementsRef.Append(element)
TransactionManager.Instance.EnsureInTransaction(doc)
dim= doc.Create.NewDimension(doc.ActiveView, line, elementsRef).ToDSType(True)
TransactionManager.Instance.TransactionTaskDone()
OUT=dim