Instantiate or Duplicate Symbols (Schematic_ComputeInstantiateDuplicateOptionsRule)

An opening ID is an entry point used to customize business logic. The Schematic_ComputeInstantiateDuplicateOptionsRule allows you to define which object can be duplicated or instantiated.

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 during the Manipulate Symbols command.

This opening ID is used to customize:

  • The objects which can be duplicated
  • The objects which can be instantiated

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: Schematic_ComputeInstantiateDuplicateOptions
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • Parameters: Corresponds to the context object.
  • Validation:

    Object manipulation:

    • 1: The object is instantiated.
    • 2: The object is duplicated.
    • 3: The object is placed in view.

    Context for new instances:

    • 0: The context for new instance is the same as the existing instance.
    • 1: The context for new instance is different from the existing object. It will be the logical father of the sheet containing the duplicated view.

Context Object Parameters

Parameter NameTypeRead/WriteComments
LogicalObject (input) LogicalOccurrenceRead Any one of the logical object selected for manipulation
List_PLM_Occurrences (input) ListRead List of occurrences of objects selected for manipulation.
List_Instantiate_Duplicate_Options (output) ListWrite

List of possible values for the objects manipulation.

Note: The possible value for this list 1, 2 or 3.
List_Context_Change_Options(output) ListWrite

List of integers

Note: The possible value for this list 0 or1.

Sample

The following sample illustrates how to define the object that can be duplicated or instantiated.

let This2DObject (LogicalOccurrence)
let ListPLMOccurrences(LIST)

set ListPLMOccurrences = Parameters.GetAttributeObject ("List_PLM_Occurrences")

let OutputInsDupOptionsList(List)
let OutputContextChangeOptionsList(List)

       
Let ReferenceObject(RFLVPMLogicalReference)
       
Let InstanceObject(RFLVPMLogicalInstance)
       
let OccurrenceObject (LogicalOccurrence)
       
let sDiscipline (String)

        
 
Let j = 1
         
for j while j<=ListPLMOccurrences->Size()
           {
               
set OccurrenceObject = ListPLMOccurrences->GetItem(j)
               
set ReferenceObject = OccurrenceObject.Reference
               
sDiscipline = ReferenceObject.V_discipline
               
if(sDiscipline == "EnsLogicalEquipment")
               
	{
                    
		set InstanceObject = OccurrenceObject.Instance
                let sdescription (String)
                set sdescription = InstanceObject.V_description
                if(sdescription == "tank")
                        OutputInsDupOptionsList.Append(3)
                else
                        OutputInsDupOptionsList.Append(1)

                     OutputContextChangeOptionsList.Append(0)
                  }
                 else
                   {
                      OutputInsDupOptionsList.Append(1)
                      OutputContextChangeOptionsList.Append(1)
                   }

	
j = j+1
            }

           
/* output parameters write */

          
Parameters.SetAttributeObject("List_Instantiate_Duplicate_Options", OutputInsDupOptionsList)
          
Parameters.SetAttributeObject("List_Context_Change_Options", OutputContextChangeOptionsList)