Engineering or Enterprise Exchange Mapping Configuration Example

This section provides examples of Engineering or Enterprise Exchange mapping configuration.

This page discusses:

For Customer Defined Data Model

This section describes another example. Let us assume that you have created a specialized data model:

  • MyVPMReference entity derived from VPMReference:
    • MyAttribute1 (Type: Integer)
    • MyAttribute2 (Type: String)
  • My3DShape entity derived from 3DShape:
    • MyAttribute3 (Type: Integer)
    • MyAttribute4 (Type: String)
  • A MyExtension customer extension for which scope contains the MyVPMReference and My3DShape types:
    • MyAttribute5 (Type: Integer)
    • MyAttribute6 (Type: String)

The following entries can be added in the pdm-cust-config.xml file to map such data model, this example illustrates the different mapping capabilities of this file:

<ObjectsConfig>
      <Object XPGXMLType="Product" V6Type="MyVPMReference" MappingType="XPDMProduct">
        <attribute XPGName="XPDMatt1" V6Name="MyAttribute1" type="integer" Export="true" Import="true" />                
        <attribute XPGName="XPDMatt2" V6Name="MyAttribute2" type="string" Export="true" Import="true" />
        <attributeGroup name="XPDMMyExtensionAttributes" >
        <attribute XPGName="XPDMatt5" V6Name="MyAttribute5" type="string" V6ExtensionName="MyExtension" Export="true" Import="true" />
        <attribute XPGName="XPDMatt6" V6Name="MyAttribute6" type="string" V6ExtensionName="MyExtension" Export="true" Import="true" />
        </attributeGroup>  
      </Object>
      <Object XPGXMLType="Rep3D" V6Type="My3DShape" MappingType="XPDMRep3D">
        <attribute XPGName="XPDMatt3" V6Name="MyAttribute3" type="integer" Export="true" Import="true" />                
        <attribute XPGName="XPDMatt4" V6Name="MyAttribute4" type="string" Export="true" Import="true" />
        <attribute XPGName="XPDMatt5" V6Name="MyAttribute5" type="string" V6ExtensionName="MyExtension" Export="true" Import="true" />
        <attribute XPGName="XPDMatt6" V6Name="MyAttribute6" type="string" V6ExtensionName="MyExtension" Export="true" Import="true" />
      </Object>
      <Object XPGXMLType="Rep3DAggr" V6Type="My3DShape" MappingType="XPDMRep3DAggr">
        <attributeGroup name="XPDMRep3DAggrAttributes" >
        <attribute XPGName="XPDMatt3" V6Name="MyAttribute3" type="integer" Export="true" Import="true" />               
        <attribute XPGName="XPDMatt4" V6Name="MyAttribute4" type="string" Export="true" Import="true" />
        </attributeGroup>  
        <attribute XPGName="XPDMatt5" V6Name="MyAttribute5" type="string" V6ExtensionName="MyExtension" Export="true" Import="true" />
        <attribute XPGName="XPDMatt6" V6Name=" MyAttribute6" type="string" V6ExtensionName="MyExtension" Export="true" Import="true" />
      </Object>
</ObjectsConfig>

Each Object tag maps an XPDMXML element (XPGXMLType) and a type (V6Type) to an external logical type (MappingType).

Within each Object tag attribute tags are used to map the attribute name (V6Name) to an external logical name (XPGName). For attributes defined on extensions V6ExtensionName must contain the extension name. An attribute results in a Property element in the XPDMXML file.

Attributes can also be grouped using the attributeGroup tag. While this capability is useful to regroup all extension’s attributes into a group, it is not limited to it (see declaration for Rep3DAggr/My3DShape). An attributeGroup results in a Properties element in the XPDMXML file.

Note: You must create as many entries as there are XPDMXML entities corresponding to the parent 3DEXPERIENCE platform entity. For example, VPMRepReference is mapped to four XPDMXML entities:
  • Rep3D
  • Rep3DAggr

Here is an extract of an XPDMXML that follows this mapping :

  
<Product id="ID_2" mappingType="XPDMProduct">
   	...
    <Property name="XPDMatt1" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="XPDMatt2" type="string" >
      <Value>dummy</Value>
    </Property>
    <Properties name="XPDMMyExtensionAttributes">
    <Property name="XPDMatt5" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="XPDMatt6" type="string" >
      <Value>dummy</Value>
    </Property>
    </Properties>
   	...    
</Product>

<Rep3D id="ID_2" mappingType="XPDMRep3D">
   	...
    <Property name="XPDMatt3" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="XPDMatt4" type="string" >
      <Value>dummy</Value>
    </Property>
   <Property name="XPDMatt5" type="integer" >
      <Value>10</Value>
   </Property>
   <Property name="XPDMatt6" type="string" >
      <Value>dummy</Value>
   </Property>
  	...    
</Rep3D>

<Rep3DAggr id="ID_2" mappingType="XPDMRep3DAggr">
   	...
    <Properties name="XPDMRep3DAggrAttributes">
    <Property name=" XPDMatt3" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name=" XPDMatt4" type="string" >
      <Value>dummy</Value>
    </Property>
    </Properties>
    <Property name="XPDMatt5" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="XPDMatt6" type="string" >
      <Value>dummy</Value>
    </Property>
  	...    
</Rep3DAggr>

Similarly, you can declare custom attributes of types specializing Instances, Representation Instances.

The supported types for Property elements are listed in XPDMXMLCore.xsd (DynamicAttributeValueTypeEnum). For more information, see Resources For Creating An X-PDM Adapter.

When 3DEXPERIENCE platform custom attributes are defined as an enumeration of values, the Property value is the index of the value. For example if, an attribute is an enumeration of strings A, B and C, exporting value B generates the following content in XPDMXML file:

<Property name="MyEnumerationAtt1" type="integer">
<Value>2</Value> 
</Property>

For baseline behavior Data Model

The two V_fromExternalId and V_versionComment attributes that are available on any References of Representations are not part of the XPDMXML predefined schema; they can be mapped the same way as any customer defined attribute. Here is an example :

<attribute XPGName="From External Id" V6Name="V_fromExternalId" type="string" Export="true" Import="true" />
<attribute XPGName="Version Comment" V6Name="V_versionComment" type="string" Export="true" Import="true" />

Default Mapping For Customer Defined Data Model

When no mapping is provided for customer defined data model in the pdm-cust-config.xml a default mapping is done :

  • Specialized object type is used in the mappingType attribute value of the XPDMXML object element.
  • Attributes name is used in the name attribute value of the XPDMXML Property element.
  • Extension attributes are grouped into a Properties element for which the extension name is used in the name attribute value.

Attributes can be filtered at export by clearing the Exportable option when defining the attribute. When configuring a mapping using the pdm-cust-config.xml file this option is ignored. When out of the box types (i.e. not specialized) are exchanged, the mappingType attributes are not set on object elements.

Here is the an XPDMXML extract of this default mapping for the customer defined data model described in the first part of this page :

<Product id="ID_2" mappingType="MyVPMReference">
   	...
    <Property name="MyAttribute1" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="MyAttribute2" type="string" >
      <Value>dummy</Value>
    </Property>
    <Properties name="MyExtension">
    <Property name="MyAttribute5" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="MyAttribute6" type="string" >
      <Value>dummy</Value>
    </Property>
    </Properties>
   	...    
</Product>

<Rep3D id="ID_2" mappingType="XPDMRep3D">
   	...
    <Property name="MyAttribute3" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="MyAttribute4" type="string" >
      <Value>dummy</Value>
    </Property>
    <Properties name="MyExtension">
    <Property name="MyAttribute5" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="MyAttribute6" type="string" >
      <Value>dummy</Value>
    </Property>
    </Properties>
  	...    
</Rep3D>

<Rep3DAggr id="ID_2" mappingType="XPDMRep3DAggr">
   	...
    <Property name="MyAttribute3" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="MyAttribute4" type="string" >
      <Value>dummy</Value>
    </Property>
    <Properties name="MyExtension">
    <Property name="MyAttribute5" type="integer" >
      <Value>10</Value>
    </Property>
    <Property name="MyAttribute6" type="string" >
      <Value>dummy</Value>
    </Property>
    </Properties>
  	...    
</Rep3DAggr>
Notes:
  • When you create a blackbox structure of a CATPart and CATProduct, and map the customized VPMReference information to both the products, and try to import without geometric conversion using XPDMImportExportBatch, the import fails showing an error.
    • If the VPMInstance is specialized, then <ProductInst> should use attribute mappingtype="specialzied instance type".
    • If the VPMInstance is not specialized, then no need to use mapping type. OOTB type will be used instead.
    • In PowerBy scenario, instances inside blackbox are internally managed, and the VPMInstance customization is not supported.
  • You can control the exchange of custom attributes using the command V6/XPDM Exportable during data model customization. For more information, see Installation and Setup | Customize | 3DEXPERIENCE Platform: 3DSpace | 3DSpace Data Model | Data Model Customization | Specialize Data Model | Specialization Types | Creating, Editing, and Deleting an Attribute