Below is some information on CATRule to generate the Physical ID for Object currently
loaded in 3DEXPERIENCE.
The PLM Leader creates a new rule (.CATRule) for IFC export that is executed by PLM
Designer each time a IFC file is exported. The purpose of this rule is to retrieve the
Physical ID of the PLM object that is currently being processed
(ThisObject) and to store that identifier in a custom attribute
PLMInputProperties supplied through the export parameters.
Example of CATRule:
Let custo_attributes (Feature)
Let thisObjectPhysicalID (String)
Trace(1, "===== START: GetPhysicalID_CATRule =====")
// Check if ThisObject exists
if (ThisObject <> NULL) {
// Retrieve PhysicalID
thisObjectPhysicalID = ThisObject.GetPhysicalId()
Trace(1, "PhysicalID of object: ", thisObjectPhysicalID)
// Get PLMInputProperties to store custom attributes
if (Parameters->HasAttribute("PLMInputProperties") == true) {
custo_attributes = Parameters->GetAttributeObject("PLMInputProperties")
thisObjectPhysicalID = ThisObject.GetPhysicalId()
Trace(1, "PhysicalID of object: ", thisObjectPhysicalID)
// Store PhysicalID in a custom attribute (example)
custo_attributes->SetAttributeString("Instance_PhysicalID", thisObjectPhysicalID)
Trace(1, "Stored PhysicalID in custom attribute: ", thisObjectPhysicalID)
} else {
Trace(1, "ERROR: PLMInputProperties not available!")
}
} else {
Trace(1, "ERROR: ThisObject is NULL!")
}
Trace(1, "===== END: GetPhysicalID_CATRule =====")