Hi everyone
I’m trying to get the Detail curve from Detail line family! For dimension between the lines
I am really happy to receive help from someone
@Bach Try replacing the Element.Curves node with Element.GetLocation to get the line(curve) of the detail item family. I believe geometry query nodes do not function the same with 2D elements as they do with 3D elements.
Also, would you share the Python script that you are using or its source?
@awilliams Thanks for quick answer!
I already replacing Element.Curves node with Element.GetLocation but i still can not get 8 line
This is python code
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
if isinstance(IN[0], list):
lines = []
for i in IN[0]:
lines.append(UnwrapElement(i))
else:
lines = [UnwrapElement(IN[0])]
crvs = []
for line in lines:
crvs.append(line.GeometryCurve)
TransactionManager.Instance.EnsureInTransaction(doc)
for crv in crvs:
ref = ReferenceArray()
ref.Append(crv.GetEndPointReference(0))
ref.Append(crv.GetEndPointReference(1))
dim = doc.Create.NewDimension(doc.ActiveView, crv, ref)
TransactionManager.Instance.TransactionTaskDone()
OUT = dim
@awilliams
Please refer this topic
@Bach the script you are working with is expecting a list of elements, rather than one element. You can use the node “Turn Into List” from the Clockwork package like so and the Python script should run:
@awilliams Thanks so much!
Please talk to me what version ClockWork? I can not find node “Turn Into List”
Any version. Try TurnIntoList (without whitespace)
@Andreas_Dieckmann I just found it pake “CAAD_RWTH”" but it does not work
No, that’s old stuff. Uninstall it. You’ll want Clockwork for Dynamo 1.x
Element.GetLocation from Clockwork works