CATRule to Format Labels for Sub-Component

Using a CATRule, you can specify the format of labels that are created on a Sub-Component of either a Manufacturing Item, a Resource, or an Operation-Output in the views. You can use the Label command from the Instructions Tools 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 DELWKIDMULabelPropertiesSubComponent_BL_ID
Customization intent Execution
Execution context Client
CATRuleExit DELWKIDMULabelPropertiesSubComponent.CATRuleExit
Sample CATRule DELWKIDMULabelPropertiesSubComponent.CATRule
This BL is invoked when you author Labels on a Sub-Component of either a Manufacturing Item or a Resource or an Operation-Output using Label from the Instructions Authoring section of the action bar.

Input Objects

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 would be one of the following types - DELFmiFunctionReference, VPMReference, DELLmiGeneralOperationReference, DELLmiPunctualOperationReference, DELLmiCurveOperationReference, DELLmiLoadingOperationReference, DELLmiPickingOperationReference, DELLmiUnloadingOperationReference, DELLmiRemoveMaterialOperationReference, DELLmiTransferOperationReference, DELLmiSinkOperationReference, DELLmiSourceOperationReference, DELLmiBufferOperationReference, DELLmiInterruptOperationReference, DELLmiHeaderOperationReference, DELLmiExecHeaderOperationReference, DELLmiPickingOperationReference, DELLmiWorkOrderReference, DELLmiProductionPlanReference

target_occurrence Read ProductOccurrence The subcomponent (product or resource) occurrence that is the source of the label's content
target_display_name Read String The display name the target subcomponent (product / resource)
pointed_occurrence Read Object The Mfg Item or Resource or Process-Output occurrence that the label is associated with
pointed_display_name Read String The display name of the pointed Mfg Item or Resource or Process-output occurrence
buildup_type_string Read String The buildup type (status) of the pointed object
operation_occurrence Read Object The active Operation occurrence (The selected Operation in Operations filmstrip)

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\ DELWKIDMULabelPropertiesForMfgItem.CATRule.

Sample-BL does the following:

  • Gets the input values from the BL-Parameter target_occurrence, target_display_name, pointed_occurrence, pointed_display_name, buildup_type_string.
  • Sets target display name as output value on the BL-Parameter output_text.
  • Defines the background color (backgroundColor) based on the build-up-type buildup_type_string.
  • Defines appropriate values for label properties (format) and defines on the BL-Parameter output_format.