About Valuation of Attributes
Below is some information about a Business Logic (PLMImportExportAttributesValuation) to value some attributes at import or export.
For more information, in particular full description of the parameters, see Import/Export Attributes Valuation (PLMImportExportAttributesValuation).
Add the Name of Imported File
Below is some information on how to add the name of the imported file to the PLM Object currently imported in 3DEXPERIENCE.
PLM Leader creates a new rule (.CATRule) for STEP import where the source filename ExternalFileName is accessible and usable to customize the currently processed PLM object (ThisObject).
PLM Designer applies this Business Logic rule when importing STEP files.
The imported data now have an atttribute containing the concatenated name of the source STEP file associated to each entity, with the value built and set in the Business Logic. The attribute may be a new one or an existing or default one.
Example of rule:
Let filename(string)
if (ThisObject->HasAttribute(“V_fromExternalID”) == true)
{
If (Parameters->HasAttribute(“ExternalFileName”) == true)
{
filename = Parameters->GetAttributeObject(“ExternalFileName”)
ThisObject->SetAttributeString(“V_fromExternalID”, filename)
}
}
Manage the Enterprise Item Number
Below is some information on how to manage the Enterprise Item Number at import and export.
The Enterprise Item Number (EIN) is the primary identifier of an object.
At Import
You can modify the EIN associated to the current PLM Object imported in 3DEXPERIENCE.
Create a new rule (.CATRule) for STEP import, where the primary identifier (information coming from Parameters in the Business Logic) can be set to oEnterpriseItemNumber (attribute associated to the Parameters, not the output Proxy: ThisObject.
The rule is applied to the imported data, which now contains a field V_partNumber with the value built and set in the Business Logic.
Example of rule:
Let IEM(string)
if (Parameters->HasAttribute(“iFileId”) == true) {
if (Parameters->HasAttribute(“oEnterpriseItemNumber”) == true) {
IEM = Parameters->GetAttributeString(“iFileId”)
Parameters->SetAttributeString(“oEntepriseItemNumber”, IEM)
}
}
At Export
You can retrieve the Enterprise Item Number associated to the current PLM Object exported from the 3DEXPERIENCE.
Create a new rule (.CATRule) for STEP export where the EIN can be retrieved via the ThisObject (current object being processed) attribute V_PartNumber. V_PartNumber can be set to the Context Object Parameter called oReferenceId (or to another parameter depending on the final intent).
The rule is applied to the exported data. STEP Product name/Filename etc. (depending on the filled Context Parameters) now match EIN.
Example of rule:
Let EnterpriseItemNumber(string)
if (ThisObject->HasAttrbute(“V_PartNumber”) == true) {
EnterpriseItemNumber = ThisObject->GetAttributeString(“V_PartNumber”)
if (Parameters->HasAttribute(“oReferenceId”) == true) {
Parameters->SetAttribute(“oReferenceId”, EnterpriseItemNumber)
}
}
Apply a Mapping to Attributes
Below is some information on how to apply a mapping to objects-attributes at export. These attributes are exported following the STEP Recommended Practices as customized PDM properties.
The goal is to map a 3DEXPERIENCE
property to a written STEP property. For example, map the Property P1 to the
GENERAL_PROPERTY MyM3R. 
An example of rule could be
// The output « PLMInputProperties » context object parameter.
// Its name is actually missleading, but it is a parameter used in our scenario as output.
// It is a `Feature`: understand a sub-context in which it is possible to add attributes.
Let custo_attributes(Feature)
if (true == Parameters->HasAttribute("PLMInputProperties")) {
custo_attributes = Parameters->GetAttributeObject("PLMInputProperties")
// Parameter mapping examples, retrieve from Proxy and write into Context:
if (true == ThisObject->HasAttribute("V_Name")) {
Let vname(String)
vname = ThisObject->GetAttributeString("V_Name")
// Map parameter with a new name + modified value (add suffix).
custo_attributes->SetAttributeString("Custo_V_Name", vname + "_THL1")
if (true == ThisObject->HasAttribute("V_description")) {
Let description(String)
description = ThisObject->GetAttributeString("V_description")
// String sequence created from existing attributes:
custo_attributes->SetAttributeString("explicit-description", description + vname)
}
}
// Create a new attribute from nothing:
custo_attributes->SetAttributeBoolean("HasCustoAttributes", True)
}
with
- ExternalFileName: Current file name
- ExternalFileType: File extension
- CurrentFilePath: File path
- OriginalFilePath: Initial file path
- IsInternalComponent: Indicates if the current objet is root or not.
- PLMInputProperties: Contains any parameter of any type
- FileDescription: Contains product information
- oEnterpriseItemNumber: For DataExchangeImport only, creates the Enterprise Item Number