Rule to Manage Instance Attributes Copy (Schematic_CopyOrForbidInstanceAttr_DuringNetworkManip)

An opening ID is an entry point used to customize business logic. The Schematic_CopyOrForbidInstanceAttr_DuringNetworkManip opening ID is used to define which instance attributes are to be copied or not on newly created instance using Manipulate Symbols command.

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 when using Manipulate Symbols .

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

Input Objects

Input objects must be of the following types:

  • ThisObject: LogicalOccurrence
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
List_Selected_Instances (input) List Read List of selected instances when using the Manipulate Symbols command.
List_Copied_Instances (input) List Read List of copied instances created when using the Manipulate Symbols command.
Network_Manip_Option (input) Integer Read Selected option in the Manipulation Options Chooser dialog box:
  • 1 = Instantiate
  • 2 = Duplicate
  • 3 = Business Rule
List_Instance_Attributes (output) List Write List of instance attributes to be processed on newly created instance using the Manipulate Symbols command.
Is_ListTo_Forbid_Attrs (output) Boolean Write

TRUE: the output list List_Instance_Attributes is list of attributes not to be copied on new instance.

FALSE: the output list List_Instance_Attributes is list of attributes to be copied on new instance.

Note: For all newly created instances, all the instance attributes except the ones return by opening ID, are copied if Is_ListTo_Forbid_Attrs = TRUE. If Is_ListTo_Forbid_Attrs = FALSE, only instance attributes return by opening ID are copied.

Sample

In following example, the rule below copies the following attributes only on the newly created instance, when the Instantiate option is selected in the Manipulation Options Chooser dialog box.

  • V_description
  • CORP_Custo1
  • CORP_Custo2
  • CORP_Custo3

let lSelected_Instances (List)   
let lCopied_Instances (List)
let dManipOption(Integer)
let bIsListToForbidAttrs(Boolean)
let oList_Instance_Attributes (List)
let strAttributeName (String)
 
set lSelected_Instances = Parameters->GetAttributeObject("List_Selected_Instances")
set lCopied_Instances  = Parameters->GetAttributeObject("List_Copied_Instances")
set dManipOption = Parameters->GetAttributeInteger("Network_Manip_Option")
 
set strAttributeName = "V_description"
oList_Instance_Attributes.Append(strAttributeName)
set strAttributeName = "CORP_Custo1"
oList_Instance_Attributes.Append(strAttributeName)
set strAttributeName = "CORP_Custo2"
oList_Instance_Attributes.Append(strAttributeName)
set strAttributeName = "CORP_Custo3"
oList_Instance_Attributes.Append(strAttributeName)
 
if (dManipOption == 1)  // Copy attributes in Instantiation option 
{
Notify ("==> Copy 4 Instance  Attributes ")
set bIsListToForbidAttrs = FALSE
}
Parameters.SetAttributeObject("List_Instance_Attributes", oList_Instance_Attributes)
Parameters.SetAttributeBoolean("Is_ListTo_Forbid_Attrs", bIsListToForbidAttrs)