General InformationThe table below provides you with information related to the definition of the opening ID.
Input ObjectsInput objects must be of the following types:
Context Object ParametersIn the export context only, the business logic is used to either create the Product,
or generate the Product's name (that is listed in the Export as
CGR panel started from the Track Analysis
Assistant panel). To distinguish both cases, additional input is
provided in the
SampleThe following sample customizes the name and type of:
/* Name : DELMA_Output_CustomizeCreation_ID Mode : Execution Function : Opening run when creating a Resulting Product or a Workplan/System/Operation output or Workplan Publication or launching Export as CGR. Argument : ThisObject = Manufactured Item or System or Operation or Workplan occurrence iCreationContext (IN) string = context of creation: “Resulting Product”, “Output”, “Publication”, “Export” iTrackName (IN) string = Track name (optional) iExportedMovingObjects (IN) list = list of exported moving objects (optional) iExportedCollidingObjects (IN) list = list of exported colliding objects (optional) iExportAction (IN) = in export context only, determines if Product creation is expected or just Product name generation (optional) – possible value is ‘Create’ oProductReference (OUT) Object = Reference of Resulting Product or System/Operation output or Workplan Publication or Reference of exported Product oProductName (OUT) = in export context only, Product to be created expected name (optional) */ let oProductReference(VPMReference) let SystOcc(ProdSystemOccurrence) let PrdOcc(ProductOccurrence) let PrdName(String) let SystName(String) let CtxCreation(String) let iExportedMovingObjectsList(List) let ProductInstance(ProductOccurrence) let TrackName(String) let ExportAction(String) let ExportedObjectNb(Integer) let PrdDesc(String) set CtxCreation= Parameters->GetAttributeString("iCreationContext") Trace(1 , CtxCreation) // Case Output if (CtxCreation == "Output") { Trace(1 , "### Case output") SystOcc = ThisObject SystName = SystOcc.Name PrdName = "Output of [ " + SystName + " ]" oProductReference = new("VPMReference",PrdName,NULL) Parameters->SetAttributeObject("oProductReference",oProductReference) } // Case Publication if (CtxCreation == "Publication") { Trace(1 , "### Case Publication") SystOcc = ThisObject SystName = SystOcc.Name PrdName = "Publication of [ " + SystName + " ]" oProductReference = new("VPMReference",PrdName,NULL) Parameters->SetAttributeObject("oProductReference",oProductReference) } // Case Export from 3D View panel or TAA if (CtxCreation == "Export") { Trace(1 , "### Case Export") set SystOcc = ThisObject if(SystOcc <> NULL) { SystName = SystOcc.Name PrdName = "Exported_" + SystName } set ProdOcc = ThisObject if(ProdOcc <> NULL) { PrdName = ProdOcc.Name PrdName = "Exported_" + PrdName } if (Parameters->HasAttribute("iTrack") == true) { set TrackName= Parameters->GetAttributeString("iTrack") PrdName = PrdName + "_" + TrackName } // Needed for the display of product name in the "Export As CGR" panel Parameters->SetAttributeString("oProductName", PrdName) if (Parameters->HasAttribute("iExportAction") == true) { set ExportAction= Parameters->GetAttributeString("iExportAction") // Product should be created only in the case of "Create" if (ExportAction == "Create") oProductReference = new("VPMReference", PrdName, NULL) } if (Parameters->HasAttribute("iExportedMovingObjects") == true and oProductReference <> NULL) { set iExportedMovingObjectsList = Parameters->GetAttributeObject("iExportedMovingObjects") set ExportedObjectNb = iExportedMovingObjectsList.Size() if (ExportedObjectNb > 0) { ProductInstance = iExportedMovingObjectsList ->GetItem(1) PrdDesc = ProductInstance.Name oProductReference->SetAttributeString("V_description", PrdDesc) } } if (oProductReference <> NULL) Parameters->SetAttributeObject("oProductReference", oProductReference) } |