Hi, I’ve been reading and researching a for a few hours but struggling to get a strong understanding of dimensioning curtain walls. The dimension.byelements node dimensions lines so I thought it would be able to dimension curtain grid lines? Can curtain walls be dimensioned by dimension.byelements node? Or do you need to understand python coding to achieve this currently?
Looking likely, have a look through a bit of Python that can be found here:
and the designtech.io package from here https://designtech.io/tools/#dynamo
Awesome thanks. Will dive into this after gym. I was on Lydna.com just before trying to start the beginnings of python coding. Lynda is free when you join up to the Auckland Library.
Sorry man… keep posting and figuring out stuff and reposting… finally figured out how to get your script to work for a section view overall dimension on a curtain wall, but need it to pick up curtain grids aswell and take lists.
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 = UnwrapElement(IN[0]).GeometryCurve
elements= IN[1]
view = UnwrapElement(IN[2])
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(view, line, elementsRef).ToDSType(True)
TransactionManager.Instance.TransactionTaskDone()
OUT=dim
For multiple views, references and dimension setout lines, all the python inputs needed to be able to handle lists.
import clr
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]
views = tolist(UnwrapElement(IN[2]))
dimSetoutLines = tolist(UnwrapElement(IN[0]))
refs = tolist(UnwrapElement(IN[1]))
refArrays = []
outList = []
for refList in refs:
rArr = ReferenceArray()
for l in refList:
rArr.Append(l)
refArrays.append(rArr)
TransactionManager.Instance.EnsureInTransaction(doc)
for l,r,v in zip(dimSetoutLines,refArrays,views):
try:
outList.append(doc.Create.NewDimension(v,l.GeometryCurve,r))
except Exception,e:
outList.append(e.message)
TransactionManager.Instance.TransactionTaskDone()
OUT = outList
To get the references of the CurtainGridLines use the node from the designtech.io package.
This is amazing! thank you!