Showing results for 
Search instead for 
Do you mean 
Reply

Unique Identifiers for JtkPart/Assemblies/Instances

[ Edited ]

I'm currently searching for a unique identifier for JtkParts, JtkAssemblies and JtkInstances.

This identifier shouldn't change if someone modifies the object and also be accessible with the JT Open Toolkit.

When I do a detailed dump of my files with the jtinfo utility it get an output like

JtkAssembly: "ArbitraryName" (Id=189989, version=88)
BBox: [-118.8,-75,-37.422] [270,185,156.95]
# Properties: 19
...

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;
int id;
partPointer->getId(id);

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.)

-------

Update:

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.

What is JT?

JT is the World’s Most Widely Used 3D File Format for PLM

JT is the common language of PLM and is the world’s most widely used 3D format. JT is the first ISO International Standard ( IS 14306-1) for 3D visualization and collaboration. Compact and accurate, JT is used throughout the product development lifecycle in all major industries to communicate the critical design information typically locked up inside a CAD file.

Siemens PLM Software customers rely on JT to be the most robust 3D visualization format available.

JT Open Factsheet
JT Open Member Resources
JT Open Documentation Technology
JT Open File Format Technology
JT Open Toolkit

Downloadable viewers for Windows Desktop, Windows 10 Universal App, Android and iOS.


Download JT2Go for your platform today Download JT2Go Desktop 64 Bit all languages
Download JT2Go Desktop 32 Bit for English
Windows 10 JT2Go Universal App
Android JT2Go
iOS JT2Go