Configure unique identifiers - SmartPlant Foundation - IM Update 48 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

You can control the format and value for an object’s unique identifier definition (UID) and unique key definition by setting the SPFUIDDef and SPFUniqueKeyDef properties on the class definition of the object. For most objects, you can define a prefix and then use the object's name as the value. For example, specifying TG.Name as the SPFUIDDef property for tags results in any tags being given a UID of TG_NameofTag.

For documents, additional configuration is available that allows each of the document classes (master, revision, and version) to inherit the UID and/or unique key from the PARENT object in the document class definition hierarchy. For example, in the default design document configuration, the document revision UID is defined as the document master UID with the major and minor revision appended to it.

You can define inheritance of UIDs and unique keys for document classes using the PARENTUID keyword. For example:

SPFUIDDef="PARENTUID,SPFMajorRevision,SPFMinorRevision"

Similarly, you can set the unique key using the document master's unique key on the revision using the following:

SPFUniqueKeyDef="PARENT,SPFMajorRevision,SPFMinorRevision"

You must not use PARENTUID as part of a unique key definition as this can disconnect relationship definitions from the objects. The recommended way of configuring this type of inheritance for UIDs is to use the PARENT key word. Therefore:

  • PARENT for use only in a Unique Key definition.

  • PARENTUID for use only in a UID definition.

PARENT and PARENTUID example

  <ClassDef>

    <IObject UID="SPFDesignDocMaster" Name="SPFDesignDocMaster" Description="Design Document" ContainerID="Core.SPFDesignDocumentSchema" />

    <ISPFClassDefExt SPFIsConfigurationControlled="True" SPFUniqueKeyDef="DM,CurrentConfig,Name" SPFUIDDef="DM,CurrentConfig,Name" />

    <ISchemaObj DisplayName="Design document" />

    <IClassDef />

  </ClassDef>

 

  <ClassDef>

    <IObject UID="SPFDesignDocRevision" Name="SPFDesignDocRevision" Description="Design Document Revision" ContainerID="Core.SPFDesignDocumentSchema" />

    <ISPFClassDefExt SPFIsConfigurationControlled="True" SPFUniqueKeyDef="PARENT,SPFMajorRevision,SPFMinorRevision" SPFUIDDef="PARENTUID,SPFMajorRevision,SPFMinorRevision" />

    <ISchemaObj DisplayName="Design document revision" />

    <IClassDef />

  </ClassDef>

  <ClassDef>

    <IObject UID="SPFDesignDocVersion" Name="SPFDesignDocVersion" Description="Design Document Version" ContainerID="Core.SPFDesignDocumentSchema" />

    <ISPFClassDefExt SPFFTREnabled="True" SPFIsConfigurationControlled="True" SPFUniqueKeyDef="PARENT,SPFDocVersion" SPFUIDDef="PARENTUID,SPFDocVersion" />

    <ISchemaObj DisplayName="Design document version" />

    <IClassDef />

  </ClassDef>

See Also

Rename objects, UIDs, and unique keys