Authorize Copy of Configuration Model from Parent to Child (DELMA_CopyModelFromParentToChildValidation_ID)

An opening ID is an entry point used to customize business logic. Authorize copy of configuration model from parent to child specifies the opening ID run to allow the copy of configuration model from a father to its child.

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.

Definition Description
PLM Opening ID DELMA_CopyModelFromParentToChildValidation_ID
Customization intent Validation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Item, system, or operation reference on which the configuration model may be copied.
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
ihParentReference Feature Read Father from which the configuration model may be copied.
Validation Boolean Write TRUE if the copy of configuration model from the parent to the child is authorized.

FALSE if the copy of configuration model from the parent to the child is not authorized.

Sample

In this sample, only the copy of the model from a Manufacturing Assembly to a Manufacturing Assembly is authorized.

Let ihParentReference(DELFmiFunctionReference)
Let ChildReference(DELFmiFunctionReference)
Let ChildType(Type)
Let ReturnMessage(String)

set ChildReference = ThisObject
Validation = false

ReturnMessage = ""

set ihParentReference = Parameters->GetAttributeObject("ihParentReference")

if (ihParentReference <> NULL)
{
  ChildType = ThisObject.PrimaryType

  /* In this example, we only authorize the copy of the model from a Manufacturing Assembly to a Manufacturing Assembly  */
  if (ChildReference.IsSupporting("CreateAssembly") and ihParentReference.IsSupporting("CreateAssembly"))
  {
    Validation = true
  }
  else
  {
    ReturnMessage = "Model not copied on child of type " + ChildType.Name
  }
}
else
{
  ReturnMessage = "Model not copied on child. Parent null"
}
Parameters.SetAttributeString("Message",ReturnMessage)