Customize Specification Feature Naming Rule (CATComponentBasedDesign_NamingRule)

An opening ID is an entry point used to customize business logic. Customize Specification Feature Naming Rule allows you to customize the name of specification features

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 only on specification feature.

This opening ID is used to customize the name of specification features.

DefinitionDescription
PLM Opening IDCATComponentBasedDesign_NamingRule
Customization intent Computation
Execution contextClient

Input Objects

Input objects must be of the following types:

  • ThisObject: CbaAnchor corresponds to the specification feature.
  • Parameters: Corresponds to the context object:
    • InternalType: Corresponds to the internal type of the specification feature. It does not depend on local language. Use it when you want to give an abbreviation to different types. As shown in the sample below, if you want to use "D" for "Deck Segment", and "P" to for pier, it's strongly recommended to use InternalType instead of Type which can vary according to local language.
    • Type: The type of specification feature in local language
    • ComponentName: The name of object type associated to the specification feature. It os void if no object type is associated to it
    • ComponentConfiguration: The selected configuration of the object type. It is void if the object type does not contain configurations.
    • Prefix: The prefix which can be added to specification names. The business rule programmer can modify the position of Prefix in the specification names, or even ignore it.
      Notes:
      • By default, if a specification feature is generated from a curvilinear pattern, Prefix will take the name of the input curve of the pattern. Otherwise, it is void.
      • You can customize Prefix in the setting of Capture Component Specifications command.
  • Name: The customized name. You can use the previous parameters and all parameters of ThisObject to determine the name which is the name of specification features.

Context Object Parameters

Parameter NameTypeRead or WriteComments
FactTypeAny EKL typeType of ThisObject in the business rule body.
InternalTypeString Read Internal type of specification feature.
TypeStringRead Type of specification feature in local language.
ComponentNameString Read Name of object type associated to the specification feature.
ComponentConfigurationStringRead Configuration of the object type.
PrefixString Read Prefix defined either by default or customized by the user.
NameStringWrite Result name of specification feature.

Sample

The following rule customizes the name of specification feature explained as follows:

Name = Prefix + AbbreviatedType + ComponentName + (ComponentConfiguration) + MoreInfo.

AbbreviatedType is described in the table below:

TypeInternalType AbbreviatedType
Window AecWindow W
Door AecDoor D
Pier BridgePier Pr
Other types Equal to Type
The sample shows only three customized abbreviated types. The company can define the abbreviated type for all used types. MoreInfo: You can associate more information to any object types, if needed. let's consider the following sample:

  • The window contains a parameter named OperationType, and the windows Height.
  • You want to add OperationTypeHeight: xx m to all specification features of window type.
  • Some bridge piers can contain a parameter named Buttress height that the company wants to add to its name in mm, not in m

Examine carefully the CATRule to see how there rules for each type and object type are programmed. This sample shows how a company can easily customize the name of the specification features. Refer to following CATRule for the exact definition of the name of specification feature for each type and each object type. For more information, see Enterprise Knowledge Language Reference Guide.

/* ================================================ */
/* File: CATComponentBasedDesign_NamingRule.CATRule */
/* ================================================ */

/* ============================= */
/* Declaration                   */
/* ============================= */
Let Name(string)
Let Prefix(string)
Let InternalType(string)
Let Type(string)
Let AbbreviatedType(string)
Let ComponentName(string)
Let ComponentConfiguration(string)
Let MoreInfo(string)

Prefix                 = Parameters.GetAttributeString("Prefix")
InternalType           = Parameters.GetAttributeString("InternalType")
Type                   = Parameters.GetAttributeString("Type")
ComponentName          = Parameters.GetAttributeString("ComponentName")
ComponentConfiguration = Parameters.GetAttributeString("ComponentConfiguration")

/* ============================= */
/* Customize AbbreviatedType     */
/* ============================= */
AbbreviatedType = Type
MoreInfo        = ""

if(InternalType == "AecWindow")
{
   AbbreviatedType = "W"
}
else
if(InternalType == "AecDoor")
{
   AbbreviatedType = "D"
  
   Let OperationType(string)
   Let OverallHeight(length)
   Let sOverallHeight(string)

   OperationType = ThisObject->GetAttributeString("OperationType")
   MoreInfo = "(Operation type: " + OperationType + ") (Width: " + ToString(ThisObject->GetAttributeReal("Height")) + "m)"
}
else
if(InternalType == "BridgePier")
{
   AbbreviatedType = "Pr"
   MoreInfo = "(Composition type: " + ThisObject->GetAttributeString("CompositionType") + ")"
   if (Anchor->HasAttribute("Buttress height") == true) 
   {
      MoreInfo = MoreInfo + " (Buttress height: " + ToString(ThisObject->GetAttributeReal("Buttress height")*1000.0) + "mm)"
   }
}

/* ============================= */
/* Create the name               */
/* ============================= */
Name = Prefix

Name = Name + “ “ + AbbreviatedType

if(ComponentName <> "") 
   Name = Name + "--" + ComponentName

if(ComponentConfiguration <> "")