CATRule to Format Labels for Resources

Using a CATRule, you can specify the format of labels that are created on Resources in the views using the Label command from the Instructions Authoring section of the action bar.

This page discusses:

General Information

The following table provides you with information related to the definition of the opening ID.
PLM Opening ID DELWKIDMULabelProperties_BL_ID
Customization intent Execution
Execution context Client
CATRuleExit DELWKIDMULabelProperties.CATRuleExit
Sample CATRule DELWKIDMULabelPropertiesForResource.CATRule

This BL is invoked when you author Labels on Resources using Label from the Instructions Authoring section of the action bar.

Input Arguments

Input Object Read/Write Type Comments
ThisObject The selected-object in a single-selection or the first object in the multiselection on which the Marker is created.
Note: ThisObject is of type DELFmiFunctionReference.
list_object_occurrence Read List The list of Mfg Item occurrence or Resource Occurrence or Operation-Output selected for the creation of the Markers.
list_object_reference Read List The list of references corresponding to occurrences coming in list_object_occurrence.
list_buildup_type Read List The list of string specifying the buildup type of the occurrences coming in list_object_occurrence.
operation_occurrence Read

The Active-Operation under which Marker’s owning 3D-Documenation-Rep is contained.

Output Arguments

Output Object Read/Write Type Comments
output_text Write List List of String – Fill with multiple strings, one for each line of text in the Label.
output_format Write List

Nested list - List of (List of 2 Strings -with attribute name, value) - Fill with multiple-list specifying the format-properties. Each sublist contains two strings, one for the format attribute name and another for the format attribute value.

For example: OutputFormatList.Append(List("fontName", "arial.ttf"))

Following are the supported properties.

Format name Value Example Value
fontName stringValue The supported formats are PostScript Type 1 format, TrueType font format, and OpenType format. Find the available font name from the 'fonts' directory in the installation folder ...\resources\fonts\TrueType\.... Use the file name as the font name.
fontSize stringValue Any value from "1" to "99"
fontColor stringValue Use RGB values to specify color. For example "255, 0, 0" for red
backgroundColor stringValue Use RGB values to specify color (See previous for example)
borderColor stringValue Use RGB values to specify color (See previous for example)
borderThickness stringValue "1" to "8" (1 being the most thin, 8 being the most thick)
borderLineType stringValue "0" to "7" (0 is no border, 1 is a solid line, etc.)
leaderEndType stringValue

"0" for Leader with Arrow end type

"1" for Leader with Circle end type

"2" for no Leader end type

transparency stringValue Use transparency value from "0" to "100"
fillVisibility stringValue Use value 0 to define no fill, otherwise use value 1
borderVisibility stringValue Use value 0 to define no border, otherwise use value 1
leaderVisibility stringValue Use value 0 to define no leader, otherwise use value 1

Sample

A complete example file is available in ..\resources\knowledge\scripts\DELWKIDMULabelPropertiesForResource.CATRule.

Sample-BL does the following.

  • Gets the input values from BL-Parameter list_object_occurrence, list_object_reference and list_buildup_type.
  • Gets the name of objects to display in Label in a string-list from inputs list_object_occurrence or list_object_reference.

    Defines the collected name-list as value on BL-Parameter output_text.

  • Defines the background color (backgroundColor) based on the build-up-type list_buildup_type.
    • For example, if the selected objects are of Resource-type only, the background color is green.
    • For example, if the selected objects are mix of Manufacturing-Item and Resource-type, the background color is white.
  • Set appropriate values for label properties (format) and set on BL-Parameter output_format.