Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
RequestCustomizedSearch | Boolean |
Read | Should the BL return results or just the value of OutputIsMenuCustomizedSearchVisible. |
OutputListSearchObjectRef | List | Write | Gives the list of the reference objects to be proposed for the alternate panel. |
OutputIsMenuCustomizedSearchVisible | Boolean | Write | To know if the customized menu will be visible. |
Sample
The following sample determines how to get the suggested alternate parts of the item
occurrence.
/* ---- input ---- */
Let ProcessOcc(MfgProcessOccurrence) /* Input Process Occurrence*/
Let RequestCustomizedSearch(Boolean) /* RequestButtonVisibleState flag */
/* ---- output ---- */
Let ListSearchObjectRef(List)
Let VisibleMenuCustomizedSearch(Boolean)
/*--- variable for code Example --- */
let SPE_REF(PLMCoreReference)
let SPE_REF_PART(Part)
let ListOfAlternateRS(list)
let NbAltRS(Integer)
let idx(Integer)
let CurAlt(Alternate)
let SPE_REF_ALT(PLMCoreReference)
let Processes (List)
let LeProcess(DELFmiFunctionReference)
set VisibleMenuCustomizedSearch = false
set ProcessOcc = ThisObject
/* ---- RETRIEVE INPUT PARAMETERS ---- */
if (true == Parameters.HasAttribute("RequestCustomizedSearch"))
{
set RequestCustomizedSearch = Parameters.GetAttributeBoolean("RequestCustomizedSearch")
}
/* ---- CODE ---- */
if (RequestCustomizedSearch == true)
{
SPE_REF=ProcessOcc.ProductScope
set SPE_REF_PART=SPE_REF
ListOfAlternateRS=SPE_REF_PART.ListAlternateParts()
NbAltRS=ListOfAlternateRS.Size()
set idx =1
for idx while idx<=NbAltRS
{
CurAlt = ListOfAlternateRS.GetItem(idx)
SPE_REF_ALT=CurAlt.Children.GetItem(1)
Processes.RemoveAll()
Processes = GetProcessOfEachScope(SPE_REF_ALT)
LeProcess=Processes.GetItem(1)
ListSearchObjectRef.Append(LeProcess)
}
}
set VisibleMenuCustomizedSearch = true
/* ---- FILL OUTPUT PARAMETERS ---- */
if (true == Parameters.HasAttribute("OutputIsMenuCustomizedSearchVisible"))
{
Parameters.SetAttributeBoolean("OutputIsMenuCustomizedSearchVisible", VisibleMenuCustomizedSearch)
}
if (true == Parameters.HasAttribute("OutputListSearchObjectRef"))
{
Parameters.SetAttributeObject("OutputListSearchObjectRef", ListSearchObjectRef)
}