Element Location property value is far from the element bounding box

Anonymous
702 Views
2 Replies
Message 1 of 3

Element Location property value is far from the element bounding box

Anonymous
Not applicable

I have a FamilyInstance element. I'm trying to get its' location as [X,Y,Z]

The value that is returned is ~ [33, -86, 0]

The true location of the element is ~[-153, -32, 58]

It doesn't seem to be related to the document's Transform since it doesn't fix it, and also the bounding box doesn't even bound this element (neither before not after applying the transform. Not even close).

 

I even tried to look at the Element's geometry and it still doesn't match.

 

Is there something I'm missing?

The element's location is LocationPoint.

 

Location L = e.Location;
LocationPoint lp = L as LocationPoint;
lp.Point

 

 

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

BenoitE&A
Collaborator
Collaborator
Accepted solution

Hi,

The location point only depends on how the family is modelled. If you don't like this you can modify the family, save it and update it in the model. 

This is why you should never use the LocationPoint to find an element. You can't know how the family was modelled...

Bye

Benoit


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
Message 3 of 3

jeremytammik
Autodesk
Autodesk

Saved for posterity:

  

https://thebuildingcoder.typepad.com/blog/2019/05/location-point-and-filtering-hints.html#2

 

Many thanks, Benoit!

 



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

0 Likes