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)