Attribute Rule

This rule enables you to define the attribute values of the input Operation object.

This page discusses:

General Information

This rule is invoked during the Generate Operations by Catalog command.

Input Objects

Inputs for the rule must be of the following type:

Object of type:

ProdSystemOccurrence

Sample

The following example explains how to define the Estimated Time (Internal Name = V_EstimatedTime) attribute value on the reference of the input Operation object.

/* Attribute Rule */
let hOperationInst(PLMOperationInstance)
let hOperationRef(PLMOperation)
let hMfgItemOcc(MfgProcessOccurrence)
let hProductOcc(ProductOccurrence)
let hProductRef(VPMReference)
let hProcessOcc(MfgProcessOccurrence)
let hProcessRef(DELFmiFunctionReference)

let ListOfProcesses(List)
let ListOfProducts(List)
let iEstimatedTime(Real)
let nbOfItems(Integer)
let sProcessTitle(String)
let ii(Integer)

if(ihOperationOcc <> NULL)
{
	set ListOfProcesses = ihOperationOcc.AssignedProcesses
	set hOperationRef = ihOperationOcc.Reference
	set nbOfItems = ListOfProcesses.Size()	
	set ii = 1
	for ii while ii <= nbOfItems
	{
		set hProcessOcc = ListOfProcesses.GetItem(ii)
		if(hProcessOcc <> NULL)
		{
			set hProcessRef = hProcessOcc.Reference
			if(hProcessRef <> NULL)
			{
				set sProcessTitle = hProcessRef->GetAttributeString("V_Name")
				if( sProcessTitle.Length()>0)
				{
					if(sProcessTitle.Search("Beam") <> -1)
						hOperationRef.V_description = "100t Truck.1; Crane 1.1"					
					else if (sProcessTitle.Search("Slab") <> -1)
						hOperationRef.V_description = "150t Truck.1;16t Assembly.1 "
					else if (sProcessTitle.Search("Stair") <> -1)
						hOperationRef.V_description = "Crane2.1;NT Assembly1.1"
					else if (sProcessTitle.Search("Column") <> -1)
						hOperationRef.V_description = "270t Truck.1;Crane3.1;NT Assembly2.1"	
					else
						hOperationRef.V_description = "Crane3.1;"					
				}
			}
		}
	}
}