NewAlignment Method question

NewAlignment Method question

PhillipM
Advocate Advocate
448 Views
3 Replies
Message 1 of 4

NewAlignment Method question

PhillipM
Advocate
Advocate

HI.

 

I'm wanting to align and lock a referencee plane from a nested family to a reference plane in the host family  through the API which can be done through the UI.

 

Is it possible to do this through the API?  In the help docs it doesn't mention that I can align RefPlane to Refplane.

 

regards

 

Phillip

 

 

These two references must be one of the following combinations:
  • 2 planar faces
  • planar face and reference plane
  • 2 lines
  • line and point
  • line and reference plane
  • 2 arcs
  • 2 cylindrical faces
These references must be already geometrically aligned (this function will not force them to become aligned).
0 Likes
449 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

The API doesn't have an official way to access the shape handle references for use with dimensions and alignments. I did however develop a work around for this a little while back as discussed in this thread

 

The basic concept is that you can read off the references from a dimension added manually to a family instance in the UI. From this you get an index number that you can use to build a new reference for any instance of that family which can be used with dimensions and alignments.

 

For each family you would need to go through the manual process of determining the correct index values though, so it's not an ideal solution for general purpose add-ins dealing with arbitrary families.

 

0 Likes
Message 3 of 4

jeremytammik
Autodesk
Autodesk

Dear Phillip,

 

Thank you for your query, and thank you Scott for the workaround.

 

I passed it on to the development team by creating a new wish list item CF-1950 [API: use NewAlignment to lock reference plane in nested family to reference plane in host family] for you.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 4 of 4

PhillipM
Advocate
Advocate

Thank you Scott for sharing your cleaver work around.  Unfortunaetly for this situation I don't think it is practical.

 

Thank you Jeremy for submitting this as a wishlist item.

 

Regards

 

Phillip Miller

Kiwi Codes Solutions ltd

0 Likes