General InformationThis opening ID is invoked only on specification feature. This opening ID is used to customize the name of specification features.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following rule customizes the name of specification feature explained as follows: Name =
MoreInfo : You can
associate more information to any object types, if
needed. let's consider the following sample:
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 <> "") |