references in the same place

references in the same place

Anonymous
Not applicable
752 Views
5 Replies
Message 1 of 6

references in the same place

Anonymous
Not applicable

Hi,

 

Is there a possibility to check if references (say familyreferences of different instances placed in a model) are parallel and in the same place/overlapping?

 

regards,

Raymond

 

 

0 Likes
753 Views
5 Replies
Replies (5)
Message 2 of 6

jeremytammik
Autodesk
Autodesk

Dear Raymond,

 

Thank you for your query.

 

Yes, of course.

 

Each family instance has an insertion point and a rotation.

 

The insertion point may be handled differently depending on the type of family definition and instance placement type, e.g., face or curve hosted, etc.

 

Please provide a more detailed example of your exact situation, and I am sure it can be easily solved.

 

You can also retrieve the family instance placement transformation from its geometry, by accessing the GeometryInstance Transform property:

 

http://www.revitapidocs.com/2018.1/99cb4580-9b59-6564-8181-6082f275a869.htm

 

That will probably provide a more generic possibility to compare the properties you are after.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 6

Anonymous
Not applicable
Hi Jeremy,

I would like to compare the references of facebased familyinstances. If
they are in line (say vertically) and 4 instances are placed I would like
to return 1 reference instead of 4.
0 Likes
Message 4 of 6

jeremytammik
Autodesk
Autodesk

Dear Raymond,

Thank you for your update.

 

Yes, well, what I already said above still applies.

 

You can use the insertion point and direction for some basic comparison.

 

If you need more than that, you can analyse and compare the respective GeometryInstance Transform property values.


Best regards,

Jeremy



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

0 Likes
Message 5 of 6

Anonymous
Not applicable
Correct me if I am wrong, but a reference does not have a direct accessible
direction. Is there a way to retreive the direction of the reference (other
than using FAIR59 example in another post)?
0 Likes
Message 6 of 6

jeremytammik
Autodesk
Autodesk

Dear Raymond,

 

  doc.GetElement( Reference.ElementId ).GetGeometry( new Options )

returns the family instance element geometry.

 

It contains a GeometryInstance, which has a Transform, which determines a coordinate system including a direction.

 

Cheers,

 

Jeremy



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

0 Likes