How to identify different Faces on SurfaceBody with an UniqueId?

How to identify different Faces on SurfaceBody with an UniqueId?

Anonymous
Not applicable
771 Views
3 Replies
Message 1 of 4

How to identify different Faces on SurfaceBody with an UniqueId?

Anonymous
Not applicable

Currently I'm connecting an Inventor Face on a Part Document.

Applying some material and connecting to a DB.

I'm using the internal name as identifier, but I don't know if its persistent the internalname.

 

And if the Surfacebody change what would happen to the parts.

 

Also is there another way to identify a Face element on a part document.

 

Thanks for the help

 

0 Likes
772 Views
3 Replies
Replies (3)
Message 2 of 4

YuhanZhang
Autodesk
Autodesk

The Face.InternalName is persistent until it is destroied.

 

Another way to retrieve a Face is to use the ReferenceKey, use the Face.GetReferenceKey and ReferenceKeyManager.KeyToString to store the ReferenceKey of a Face, then when you want to retrieve the Face use the ReferenceKeyManager.StringToKey and BindKeyToObject.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Message 3 of 4

philippe.leefsma
Alumni
Alumni

As Rocky mentioned, ReferenceKeys is the way to go to identify reliably faces.

 

You can take a look in the APi Help Files which have a dedicated topic and the Inventor Training Material (Module 18), for samples in C# and Vb.Net.

 

Hope that helps,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 4 of 4

Anonymous
Not applicable

Thanks, that a good material to start

0 Likes