Customize Resulting Product or Workplan/Operation/System Output or Workplan Publication Creation (DELMA_Output_CustomizeCreation_ID)

An opening ID is an entry point used to customize business logic.Customize Resulting Product or Workplan/Operation/System output or Workplan Publication Creation specifies the opening ID run to customize the name and type of:

  • The resulting Product
  • Or of the workplan/operation/system output
  • Or of the workplan publication
  • Or of the exported Product.
Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

The table below provides you with information related to the definition of the opening ID.

PLM Opening ID DELMA_Output_CustomizeCreation_ID
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Item, or system, or operation, or workplan occurrence, or requirement, or product reference (FProcessOccurrence, ProdSystemOccurrence, Requirement, VPMReference).
  • Parameters: corresponds to the context object.

Context Object Parameters

In 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 iExportAction parameter. If this input is defined as Create, then the business logic is used to create the Product; else, it is used to generate the Product's name. To only generate the Product's name, additional output is provided with the oProductName parameter.

Parameter Name Type Read/Write Comments
iCreationContext String Read String:
  • Resulting Product
  • Output
  • Publication
  • Publication_FTAGeometry
  • Publication_Previous
  • Publication_AdditionalProducts
  • Export
iTrackName String Read Track Name (optional)
iExportedMovingObjects List of Product Occurrences Read List of Product Occurrences = list of exported moving objects (optional)
iExportedCollidingObjects List of Product Occurrences Read List of exported colliding objects (optional)
iExportAction String Read In the export context only: determines if the expected action is the Product's creation, or the Product's name generation (optional):
  • To create the Product, the expected value is Create.
  • To generate the Product's name, no input is required.
oProductReference VPMReference Write Reference of:
  • The resulting Product
  • Or of the system/operation output
  • Or of the workplan publication
  • Or of the exported Product.
oProductName String Write In the export context only: expected name of the exported Product (optional)

Sample

The following sample customizes the name and type of:

  • The resulting product
  • Or of the workplan/operation/system output
  • Or of the workplan publication
  • Or of the exported Product.

/*
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)
}