I haven't tested it, but I strongly assume this ID is the same, I'd get if I execute this code
JtkHierarchy* partPointer = something;
But what worries me is the function description which says
InstId - The 32-bit integer instance identifier value associated with the node. Note, if the user has not explicitly set this value, the toolkit will auto-generate a unique identifier and return this value.
What if the program that saved the JT file decided not to attach an ID? Am I guaranteed that the JT Open Toolkit always generates the same ID?
Or is this note just valid if I created a Jt-object with the toolkit and didn't assign an identifier?
Since the documentation says that it's a unique ID, I'd rely on this. But how do I know when and how this value will be changed by a CAD program?
I'm also wondering why some JT files have totally arbitrary IDs whereas others are enumerated.
(The functional description of the JT Open Toolkit also introduces the concept of GUIDs which are in the UUID format, but they represents the state of a JtkXTBody, so it changes every time a change has been made.)
I just noticed that one of my JT files just features "0" for all IDs according to the jtinfo utility.
I'm assuming this utility uses the same getID(int& id) function that is exposed in the toolkit. So shouldn't it create at least some IDs while traversing through the file?
And since the name can appear multiple times, it's not possible to rely on that feature as well.