Identical Part Attribute Rule

This rule enables you to define the attribute values of the Identical Part object.

This page discusses:

See Also
Checker Rule
Naming Rule
Opening Rule
Part Planning Rule
Profile Rule
Part Computation Rule
Shrinkage Compensation Rule
Weld Rules
Workshop Document Rule

General Information

This action rule is invoked when opening a session. The rule only runs once, and the values returned are retained the next time you open a session.

Input Objects

Input objects must be of the following type:

Parameters correspond to the context object.

Example

The following example describes the action rule for identical part attribute management. You can use this example to make another script in the action rule.

For oTargetIdx:

  • If the variable returns "1", the rule retrieves the attribute value for the identical part from the EBOM.
  • If the variable returns "2", the rule retrieves the attribute value for the identical part from the MBOM.

For ioAttributeIdentifier:

  • If the variable returns "1", the rule retrieves the position attribute from the ioAttributeIdentifier of the EBOM.
  • If the variable returns "2", the rule retrieves the position attribute from the ioAttributeIdentifier of the MBOM.

let iTargetBOM(String)
let ioAttributeIdentifier(String)
let oTargetIdx(Integer)

//The user can define this value.
//But the return value must be 1(from EBOM) or 2(from MBOM)
set iTargetBOM = "EBOM"
//set iTargetBOM = "MBOM"

//Pre-definded attribute
set ioAttributeIdentifier = "V_StrPositionNumber"
set oTargetIdx = 1 //default

if(iTargetBOM == "EBOM")
{
	set ioAttributeIdentifier = "V_StrPositionNumber"
	set oTargetIdx = 1
}
else if(iTargetBOM == "MBOM")
{
	set ioAttributeIdentifier = "V_description"
	set oTargetIdx = 2
}

Parameters.SetAttributeInteger("TargetBOM", oTargetIdx)
Parameters.SetAttributeString("AttributeIdentifier", ioAttributeIdentifier)