Persistent IDs

Persistent IDs are identifier strings or integers attached to entities. However, not all entities have persistent IDs. This depends on the format. HOOPS Exchange supports the concept of persistent IDs for certain file formats. Persistent IDs are important for developers drawing data from many CAD systems, since IDs assigned to model entities are persistent across different sessions.

Persistent IDs are stored as a field in the A3DRootBaseData structure as either a string A3DRootBaseData.m_pcPersistentId or an integer A3DRootBaseData.m_uiPersistentId. This attribute could be retrieved from rootbase data, with an additional way for assembly members by using A3DAsmProductOccurrenceGetIdentifier().

The persistent ID assigned to an entity will be defined by the CAD format. For HOOPS Exchange, ensure that each time the same file (or any version of the same file) is read so that any entity will have the same identifier previously defined. Typically, this confirms that any entities found with IDs matching between multiple files are in fact the same entity.

It is important to note that these IDs are not guaranteed to be unique. For instance, there are some cases where entities like faces can have the same ID. For example, this could happen when a feature groove is applied to define a body. More specific information on an example like this can be found in the table below. Navigate to any of one of these formats and sections to see these details: Inventor, CATIA, or SLW’s rows regarding the column Splitting a face - Adding a Groove.

Below is a table that provides information on how HOOPS Exchange supports persistent IDs across different formats and several different topological entity modifications. Each tab within each format section describes a different modification of a cube part and how the persistent IDs are effected based off of the changes described. They include image examples of each type of modification occuring to the part.

Formats and their Modification Supports

CATIA

This section describes what happens to the persistent IDs for parts in the CATIA file format with different part modifications.

Adding a loop to a face - Extruding a hole into a cube

In this model modification, we see the original, unaltered cube on the left and the altered cube on the right. In this instance, the part was modified by adding a loop to a face, ie. extruding a hole into the cube.

Original cube part Modified cube part
../_images/cube_part.png ../_images/add_hole_cube_part.png

See below for what’s new to the part after modification, and any possible changes that may have occurred and altered any persistent IDs to the part file.

  Faces Edges
New

2 faces with same persistent ID

(CATIA split cylinder)

4 edges
Changes none none

Creo

Adding a loop to a face - Extruding a hole into a cube

In this model modification, we see the original, unaltered cube on the left and the altered cube on the right. In this instance, the part was modified by adding a loop to a face, ie. extruding a hole into the cube.

Original cube part Modified cube part
../_images/cube_part.png ../_images/add_hole_cube_part.png

See below for what’s new to the part after modification, and any possible changes that may have occurred and altered any persistent IDs to the part file.

  Faces Edges
New 1 face (cylindrical) 2 edges (see modified image above)
Changes none none

Inventor

Adding a loop to a face - Extruding a hole into a cube

In this model modification, we see the original, unaltered cube on the left and the altered cube on the right. In this instance, the part was modified by adding a loop to a face, ie. extruding a hole into the cube.

Original cube part Modified cube part
../_images/cube_part.png ../_images/add_hole_cube_part.png

See below for what’s new to the part after modification, and any possible changes that may have occurred and altered any persistent IDs to the part file.

  Faces Edges
New 1 face (cylindrical) 2 edges (see modified image above)
Changes none none

NX

Editing a sketch

In this model modification, we see the original, unaltered cube on the left and the altered cube on the right. In this instance, an edit to the sketch of the part was made.

Original cube part Modified cube part
../_images/cube_part.png ../_images/edit_sketch_cube_part.png

In NX file format, editing a sketch will have no effect if the semantic does not change:

  • Editing a segment length: Does not change any persistent IDs
  • Replacing a segment: New faces and ALL associated edges will have new persistent IDs

SLW

Adding a loop to a face - Extruding a hole into a cube

In this model modification, we see the original, unaltered cube on the left and the altered cube on the right. In this instance, the part was modified by adding a loop to a face, ie. extruding a hole into the cube.

Original cube part Modified cube part
../_images/cube_part.png ../_images/add_hole_cube_part.png

See below for what’s new to the part after modification, and any possible changes that may have occurred and altered any persistent IDs to the part file.

  Faces Edges
New 1 face (cylindrical) 2 edges (see modified image above)
Changes none none

UG

Adding a loop to a face - Extruding a hole into a cube

In this model modification, we see the original, unaltered cube on the left and the altered cube on the right. In this instance, the part was modified by adding a loop to a face, ie. extruding a hole into the cube.

Original cube part Modified cube part
../_images/cube_part.png ../_images/add_hole_cube_part.png

See below for what’s new to the part after modification, and any possible changes that may have occurred and altered any persistent IDs to the part file.

  Faces Edges
New 1 face (cylindrical) 2 edges (see modified image above)
Changes none none

Immutable Persistent ID Instances: Assembly Cases

There are also several instances where the persistent IDs should never change. Read through the tabs below to see example details and images.

Base assembly

Persistent IDs should never change during base assembly. For example, notice in the image that several previously created CAD parts are being assembled to form a completed CAD product. Any manipulation of parts or objects during the assembly should never cause any change to a previously defined identifier.

../_images/base_assembly.png

Other Format Information

File Type Assembly Nodes Solids Faces Edges Density
CATIA V5 Persistent ID string (CLSID) Persistent ID integer (key) Persistent ID string as attribute (string) Persistent ID string as attribute In ProductInformation (for each occurrence corresponding to a file)
Creo/Pro-E Persistent ID string (CLSID) Not applicable Persistent ID integer (key) - Note: Persistent ID inside a part are different even when there are several solids. Persistent ID integer (key) - Note: Persistent ID inside a part are different even when there are several solids. Latest versions of Creo have them. Otherwise, we put the stored filename.
NX Persistent ID string (CLSID) Persistent ID integer (key) Persistent ID integer (key) Persistent ID integer (key) In ProductInformation (for each occurrence corresponding to a file)
SolidWorks Persistent ID string (CLSID) Persistent ID integer (key) Not applicable Not implemented In ProductInformation (for each occurrence corresponding to a file)
JT Not applicable Not applicable Not applicable Not applicable In ProductInformation (for each occurrence corresponding to a file)
SolidEdge Persistent ID string (CLSID) Persistent ID integer (key) Persistent ID string as an attribute Not implemented In ProductInformation (for each occurrence corresponding to a file)
Inventor Persistent ID string (CLSID) Persistent ID integer (key) Persistent ID string as an attribute Not implemented In ProductInformation (for each occurrence corresponding to a file)