Compute Additional Attributes Values of Routables for Harness Configuration (EWR_ComputeAdditionalAttributesValuesOfRoutablesForHarnessConfiguration)

An opening ID is an entry point used to customize business logic. The EWR_ComputeAdditionalAttributesValuesOfRoutablesForHarnessConfiguration opening ID is available in the Electrical physical system design resources set. This opening ID lets you define the value of the customized column.

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 can be invoked while configuring harnesses using the Harness Configuration command.

For more information, see Electrical 3D Design User's Guide: Generating a Configured Harness.

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

Input Objects

Input objects must be of the following types:

  • ThisObject: ProductOccurrence
  • Parameters: RuleContext corresponds to the context object.

Sample

let ListInputRoutable(LIST)
let ListAttr(LIST)
let ListListAttrValues(LIST)
let ListAttrValues(LIST)
let ListAttrValues1(LIST)

let currentObj (Feature)

let condOcc(Elec3DConductorOccurrence)
let condGroupOcc(Elec3DConductorGroupOccurrence)

let ElecCond (ElecConductor)
let condElec (Elec3DConductor)
let condGrpElec (Elec3DConductorGroup)

let condFeat (Conductor)
let condGrpFeat (ConductorGroup)

let CInstance (VPMInstance)
let CRef (VPMReference)

let index (INTEGER)
let index2 (INTEGER)


let strAttr(STRING)

let routeLen(LENGTH)
let condMass(MASS)


set ListInputRoutable = Parameters.GetAttributeObject("ListRoutables")
ListAttr =  Parameters.GetAttributeObject("ListAttributes")
ListListAttrValues =  Parameters.GetAttributeObject("ListAttributeValues")

if (NULL <> ListInputRoutable)
{
	index = 1
	for index while index <= ListInputRoutable.Size()
	{
		set currentObj = ListInputRoutable.GetItem(index)
		set condOcc = currentObj
		set condGroupOcc = currentObj
		
		set condFeat=ListInputRoutable.GetItem(index)
		set condGrpFeat=NULL
		set ElecCond = ListInputRoutable.GetItem(index)
		
		ListAttrValues.RemoveAll()	
		

		index2 = 1

		for index2 while index2 <= ListAttr.Size()
		{
			set strAttr = ListAttr.GetItem(index2)
			if(strAttr == "Sep Code")
			{
				ListAttrValues.Append(condFeat.Elec_Sep_Code)
			}
			else if(strAttr == "Length" )
			{
				let len(LENGTH)
				len = condFeat.Elec_Length
				ListAttrValues.Append(len)
						
					
			}
			else ListAttrValues.Append("NA")
		}
		ListListAttrValues.Append(ListAttrValues)
		
	}
}
if(ListListAttrValues.Size() <> ListInputRoutable.Size())
{
	 Parameters.SetAttributeInteger("severity", 2)
	 Parameters.SetAttributeString("Message", "Computation Failed!")
}
else
{
 	Parameters.SetAttributeInteger("severity", 0)
	Parameters.SetAttributeObject("ListAttributeValues", ListListAttrValues)
}