- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have a little bit of issue with finding a model line inside a family instance. So I have created a family that contains a model line. I load it into a Revit project and I want to access the model line inside it by using API.
I have already tried this post:
https://thebuildingcoder.typepad.com/blog/2011/08/retrieving-lines-within-a-family-instance.html
def model_line_extractor(list_of_elements):
modelline_references = ReferenceArray()
for l in list_of_elements:
geos = l.get_Geometry(opt)
print(geos.Objects)
it doesn't work. The error is GeometryInstance or GeometryElement does not have Objects attribute. So I was wondering if anyone can help me with this.
by the way, I want to find the ''direction'' of this model line later in the project so I think accessing the family editor directly doesn't help me (I mean this post)
https://forums.autodesk.com/t5/revit-api-forum/get-elements-inside-a-family-instance/td-p/7583858
and just to let you know, I want to use this ''direction'' for dimensioning purposes. You may ask why am I not using reference line instead of model line, the reason is when I extract the direction from the reference line, it always gives me the constant direction in which the family was originally created, not matter how much the family has been rotated inside the project, the direction is always constant (for my case it is always (1,0,0)).
Solved! Go to Solution.