Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

line.GetEndPointReference() return by None in Revit 2019

2 REPLIES 2
Reply
Message 1 of 3
Ysuuny
354 Views, 2 Replies

line.GetEndPointReference() return by None in Revit 2019

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 

 

2 REPLIES 2
Message 2 of 3
jeremytammik
in reply to: Ysuuny

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.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3
Ysuuny
in reply to: jeremytammik

Thank for your quick reply,  

Sadly.... e.ViewSpecific return by False.

 

How can i do?

Tags (1)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report