Identify Product as Equipment Availability (L2P_IdentifyAssemblyAsEquipment)

An opening ID is an entry point used to customize business logic. The Identify Product as Equipment Availability opening ID is available in the Logical to Physical Assistant Resources resource set.

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

This opening ID is invoked to validate or identify a product as an equipment assembly.

Definition Description
PLM Opening ID L2P_IdentifyAssemblyAsEquipment
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
ListInputObjects List Read List of the physical occurrences in the root from which Equipment assemblies are to be identified.
ListOutputBoolean List Write List of booleans mapped with the input list that indicates if the product occurrences are to be considered assembly as equipment.

Sample

let iList(List)
let oList(List)
let index(Integer)
let lsize(Integer)

let inputOcc(ProductOccurrence)
let inputInst(VPMInstance)
let inputRef(VPMReference)

let sName(String)
let sDescriptionInst(String)
let sDescriptionRef(String)
let sMessage (STRING)

set iList = Parameters.GetAttributeObject("ListInputObjects")

index = 1
set lsize = iList.Size()
set sMessage = "Occurrences in List = " + ToString(lsize) + ": "
for index while index <= lsize
{
	set  inputOcc = iList.GetItem(index)
	set sName = ""
	set sDescriptionInst =""
	set sDescriptionRef = ""
	
	//	Notify("Logical Occ : #",logocc.Name)
	
	if (NULL <> inputOcc)
	{
		sName = inputOcc.Name
		set sMessage = sMessage + "|" + sName + "("
		//sDescription = inputOcc.GetAttributeString("V_Description")
		inputInst = inputOcc.Instance
		
		if (NULL <> inputInst)
		{
			set sDescriptionInst = inputInst.V_description
			if(sDescriptionInst =="")
				set sDescriptionInst = inputInst.GetAttributeString("V_description")
			set sMessage = sMessage + "I-" + sDescriptionInst + ","
		}
		
		inputRef = inputOcc.Reference
		if (NULL <> inputRef)
		{
			set sDescriptionRef = inputRef.V_description
			if(sDescriptionRef =="")
				set sDescriptionRef = inputRef.GetAttributeString("V_description")
			set sMessage = sMessage + "R-" + sDescriptionRef + ")"
		}

		if( (sDescriptionInst == "AssemblyAsEquipment") or (sDescriptionRef == "AssemblyAsEquipment"))
		{
			oList.Append(true)
		}
		else
		{
			oList.Append(false)
		}
	}
}
Notify(sMessage)
Parameters.SetAttributeObject("ListOutputBoolean", oList )