I am unable to simply get a Revit Lines’ Reference as I believe I should.
Here I have my Revit Lines
Yet when I try and call their Reference Property I am given nothing but nulls.
Any ideas why?
Code:
import clr
import sys
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
# Get the input curves from Dynamo
DSpolycurve = IN[0]
RevitLines = [x.ToRevitType() for x in DSpolycurve.Curves()]
Refs = [revit_curve.Reference for revit_curve in RevitLines]
OUT = Refs
I think I lacked the fundamental understanding of what a Reference was!
I need to filter the lines to make sure I’m getting just the perimeter curves so will have to do some python filtering but I think it should be possible.
Thanks for the guidance.
If either of you fancy a further challenge I’d love some help with this post also: