Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to identify different Faces on SurfaceBody with an UniqueId?

3 REPLIES 3
Reply
Message 1 of 4
miguel.alanis
637 Views, 3 Replies

How to identify different Faces on SurfaceBody with an UniqueId?

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

 

3 REPLIES 3
Message 2 of 4
YuhanZhang
in reply to: miguel.alanis

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

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

Thanks, that a good material to start

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report