Compute the Names of Configured Harness (EWR_ComputeNamesForConfiguredHarness)

An opening ID is an entry point used to customize business logic. The ComputeNamesForConfiguredHarness opening ID is available in the Electrical physical system design resources set. This opening ID lets you specify the names of PLM entities in the configured harness.

You can also provide names for references and instances of products, electrical geometries, electrical branch geometries, electrical physical systems, and cables created in the configured harness. These names are applied to the PLM entities of configured harness.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

You can use this business rule during the creation of the configured harness.

For more information, see 3D Modeling | Electrical & Electronic Systems | Electrical 3D Design | Electrical 3D Design | Working with Cables | Synchronizing Cables | Synchronizing Cables with Cable Routes.

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

Input Objects

The input objects must be of the following types:

  • ThisObject: object type in the business rule body.
  • Parameters: context object parameters.

Context Object Parameters

Parameter Name Type Read or Write Comments
FactType Any EKL type Read Type of ThisObject in the business rule body.
ListSourceOccurrencesConfigured List (Product Occurrence) Read List of occurrences which are the source for the configured harness.
ListReferenceNamesConfigured List (String) Write List of the reference names to apply to the PLM entity created against the source harness. Leave it empty to keep the same name as the source.
ListInstanceNamesConfigured List (String) Write List of instance names which is applied to a PLM entity created against the source harness. Leave it empty to keep the same name as the source.

Sample

You can use this business rule during the creation of a configured harness:

//ThisObject  : ProductOccurrence
//Parameters : RuleContext
//

let ListSourceOccurrencesConfigured(List)
let ListReferenceNamesConfigured(List)
let ListInstanceNamesConfigured(List)
let InputOccurrence(ProductOccurrence)
let InputReference(VPMReference)
let strDuplicateInstanceName(string)
let strDuplicateReferenceName(string)
Let Index(Integer)
Let Size(Integer)

set ListSourceOccurrencesConfigured=Parameters->GetAttributeObject("ListSourceOccurrencesConfigured")
Trace(1,"Nb Occurrences =", ListSourceOccurrencesConfigured.Size())

set Size = ListSourceOccurrencesConfigured.Size()
for Index=1 while Index <Size  + 1 {
  set strDuplicateInstanceName = "" 
  set strDuplicateReferenceName = ""   
  set InputOccurrence = ListSourceOccurrencesConfigured->GetItem(Index)
  if ( InputOccurrence <> NULL ){
    set strDuplicateInstanceName = InputOccurrence.Name + "_Dupl"
    set InputReference = InputOccurrence.Reference
    if ( InputReference <> NULL ){
      set strDuplicateReferenceName = InputReference.V_Name + "_Dupl"
    }    
  }
  ListInstanceNamesConfigured.AddItem(strDuplicateInstanceName, Index)
  ListReferenceNamesConfigured.AddItem(strDuplicateReferenceName, Index)
}

Parameters.SetAttributeObject("ListInstanceNamesConfigured", ListInstanceNamesConfigured)
Parameters.SetAttributeObject("ListReferenceNamesConfigured", ListReferenceNamesConfigured)
Parameters.Severity = 0
Parameters.Message = "Succeeded"