General InformationThis opening ID is invoked at the drop of a PPR object on another PPR object. This opening ID is used to customize the wanted behavior when dropping a PPR object on another PPR object: Should the drag and drop be allowed in the current application? The table below provides you with information related to the definition of the opening ID.
Input ObjectsInput objects must be of the following type:
Context Object Parameters
SampleThe following sample shows how to use the opening ID.
/* INPUTS DEFINITION*/ Let iLstSourceOccurrences(List) Let iTargetOccurrence(Feature) Let iWorkbenchName(String) /* OUTPUTS DEFINITION*/ Let oIsAuthorized(Boolean) Let oMessage(String) Let TargetReference(PLMCoreReference) Let NbSource(Integer) Let Index(Integer) Let CurProdResSourceOcc(ProductOccurrence) Let CurProcessSourceOcc(MfgProcessOccurrence) Let CurSysOpeSourceOcc(ProdSystemOccurrence) Let CurrentSourceRef(PLMCoreReference) /* RETRIEVE INPUT PARAMETERS*/ if ( true == Parameters.HasAttribute("iListSourceOcc")) set iLstSourceOccurrences= Parameters.GetAttributeObject("iListSourceOcc") if ( true == Parameters.HasAttribute("iTargetOcc")) set iTargetOccurrence= Parameters.GetAttributeObject("iTargetOcc") if ( true == Parameters.HasAttribute("iWorkbenchName")) set iWorkbenchName= Parameters.GetAttributeString("iWorkbenchName") set oIsAuthorized = true set TargetReference = ThisObject if (NULL <> TargetReference) { set NbSource = iLstSourceOccurrences.Size() set Index = 1 for Index while Index <= NbSource { set CurProdResSourceOcc = iLstSourceOccurrences->GetItem(Index) if (NULL <> CurProdResSourceOcc) { set CurrentSourceRef = CurProdResSourceOcc.Reference } else { set CurProcessSourceOcc = iLstSourceOccurrences->GetItem(Index) if (NULL <> CurProcessSourceOcc) { set CurrentSourceRef = CurProcessSourceOcc.Reference } else { set CurSysOpeSourceOcc = iLstSourceOccurrences->GetItem(Index) if (NULL <> CurSysOpeSourceOcc) { set CurrentSourceRef = CurSysOpeSourceOcc.Reference } } } if (NULL <> CurrentSourceRef) { if ((CurrentSourceRef.IsSupporting("Provide") == true) and (TargetReference.IsSupporting("DELLmiGeneralOperationReference")) and (iWorkbenchName == "DELPPRLivePPREditorWkb")) { oIsAuthorized = false oMessage="Drag and Drop Provide on General Operation not allowed in Planning Structure" break } else if ((CurrentSourceRef.IsSupporting("DELLmiGeneralOperationReference") == true) and (TargetReference.IsSupporting("Robot")) and (iWorkbenchName == "")) { oIsAuthorized = false oMessage="Drag and Drop General Ope on Robot not allowed in Planning Structure" break } } } } if (NULL <> oIsAuthorized) Parameters.SetAttributeBoolean("oIsAuthorized", oIsAuthorized) if (NULL <> oMessage) Parameters.SetAttributeString("oMessage", oMessage) |