How to get transform of element if familyInstance is null?

How to get transform of element if familyInstance is null?

prasannamurumkar
Advocate Advocate
312 Views
2 Replies
Message 1 of 3

How to get transform of element if familyInstance is null?

prasannamurumkar
Advocate
Advocate

Required multiple points in Element for some purpose(To Create  obj file) to get right location.

 

But some elements has issue due to family instance is null.

 

FamilyInstance familyInstance = targetElement as FamilyInstance;

 

if (familyInstance !=null)
{
transform = familyInstance.GetTransform();

}

 

 

 

 

can we use another element transform in same revit model document or can we get transform in any other way?

 

 

0 Likes
Accepted solutions (1)
313 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

Many of the elements that are not family instances are defined in place. For instance, a standard wall is defined by its wall type and its location curve. The location curve is given in the global project coordinate system, so its transform is simply the identity transform.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3

prasannamurumkar
Advocate
Advocate

Thank you so much.

0 Likes