Attribute Mapping Structure
The classification attributes are specified in the
classification_attribute_mapping.json file. Class specific attribute
mapping maps a 3DEXPERIENCE
classification attribute to an ECAD property A for class B and also an ECAD property X for
class Y. The following is a sample classification attribute mapping file:
Sample Classification Attribute Mapping File
The following is a sample classification attribute mapping file:
{
"version": "2.0",
"attributes": [
{
"ClassAttributeName":"ECAD Manufacturer Part Number",
"ECADAttributeName":"Manufacturer_Part_Number"
}
],
"libraries": [
{
"libraryTitle":"ECAD-Library",
"attributes": [
{
"ClassAttributeName":"ECAD Manufacturer",
"ECADAttributeName":"Manufacturer"
}
],
"classes": [
{
"classTitle":"Resistors",
"attributes": [
{
"ClassAttributeName":"ECAD Value",
"ECADAttributeName":"Resistance"
}
]
},
{
"classTitle":"Capacitors",
"attributes": [
{
"ClassAttributeName":"ECAD Value",
"ECADAttributeName":"Capacitance"
}
]
}
]
}
]
}
The sections of the mapping file are as follows:
- Common Mapping
"attributes" section: This mapping is applied to all classes assigned to any library."attributes": [ { "ClassAttributeName":"ECAD Manufacturer Part Number", "ECADAttributeName":"Manufacturer_Part_Number" }where,classification attribute is mapped to ECAD Manufacturer Part Number and the ECAD attribute is mapped to Manufacturer_Part_Number.
- Library Specific Mapping: This mapping is applied to all
classes assigned to this library. The libraries key holds one or more library
definitions. A library definition is identified by the
libraryTitleor bylibraryName(optional). The 3DEXPERIENCE title is usually used as the class identifier. In cases where the 3DEXPERIENCE title is ambiguous, use the 3DEXPERIENCE name instead of the 3DEXPERIENCE title."libraries": [ { "libraryTitle":"ECAD-Library", "attributes": [ { "ClassAttributeName":"ECAD Manufacturer", "ECADAttributeName":"Manufacturer" } ],where,the classfication attribute is mapped to
ECAD Manufacturerand the ECAD attribute is mapped toManufacturer. - Class Specific Mapping: This mapping is applied to the
matching class (in a library’s class structure).
A class definition is similar to a library definition as it differs only it its defining keys:
classTitleandclassNameinstead oflibraryTitleandlibraryName.If a title and a name is specified for a class, the combination of both must match.
Although the mapping file can contain mappings for multiple libraries, the only libraries that are evaluated are the libraries specified within the server setting Electronic Component Library.
"classes": [ { "classTitle":"Resistors", "attributes": [ { "ClassAttributeName":"ECAD Value", "ECADAttributeName":"Resistance" } ] }, { "classTitle":"Capacitors", "attributes": [ { "ClassAttributeName":"ECAD Value", "ECADAttributeName":"Capacitance" }The class mapping itself is structured hierarchically and reflects the class structures configured in 3DEXPERIENCE. A library section may contain a subclass structure down to the level of required refinement. For example. if an attribute mapping is required for the class with the full library pathECAD library > Resistors > Capacitors, this structure needs to be replicated in the configuration as well.Note: Each library or class may add and/or override attribute mappings from their parent class or library or from the common section.
The common, library specific, and class specific mappings are all structured hierarchically to form the classification attribute mapping file.
Attribute Misconfiguration within an Individual Attribute Section
The following examples show attribute misconfiguration within an individual attribute section that causes these configurations to be ignored:
| Mapping | Issue Description |
|---|---|
"ClassAttributeName":"X", "ECADAttributeName" :"", |
ECAD attribute name is not defined. |
"ClassAttributeName":"", "ECADAttributeName" :"Y", |
Class attribute name is not defined. |
{
"ClassAttributeName":"A",
"ECADAttributeName" :"B",
}
{
"ClassAttributeName":"A",
"ECADAttributeName" :"B",
}
|
Duplicate mapping entry. In this example, the mapping entries for Class and
ECAD matches with another entry in the same attribute section. In such cases, only the first entry is considered, and the duplicate entry is ignored. |
{
"ClassAttributeName":"C",
"ECADAttributeName" :"D",
}
{
"ClassAttributeName":"C",
"ECADAttributeName" :"E",
}
|
1:N mapping violation. Mapping of ECAD attribute to another classification attribute already exists. In such cases, the second entry is ignored. |
{
"ClassAttributeName":"N",
"ECADAttributeName" :"M",
}
{
"ClassAttributeName":"O",
"ECADAttributeName" :"M",
}
|
N:1 mapping violation. Mapping of classification attribute to another ECAD attribute already exists. In such cases, the second entry is ignored. |
