Hi,
I'm try to get line reference for using newAlignment().
but, It's return None....
e = doc.GetElement(face.ElementId) # FamilyInstance faceEle = e.GetGeometryObjectFromReference(face) # PlanarFace face_list = faceEle.GetEdgesAsCurveLoops() # List[CurveLoop] ele_line=face_list[0] option = opt() # => from Autodesk.Revit.DB import Options as opt option.ComputeReferences = True option.IncludeNonVisibleObjects = True for i in ele_line: print(i.GetEndPointReference(0)) # None print(i.Reference) # None
▲ The above code is part of the code.
Please help me.......
I using Revit 2019, Python
* The translation can be strange. : D
You want to use it to create a dimension or a constraint?
Well, that depends on the view, doesn't it?
Therefore, you should retrieve the view-specific geometry for the element.
Ensure that you can achieve what you want manually in the user interface first, before attacking it programmatically. That will ensure you have the right view selected.
I hope that helps.
Can't find what you're looking for? Ask the community or share your knowledge.