Color Filling Business Rule (EHFDrawing_ComputationProtectionFillingColor)

An opening ID is an entry point used to customize business logic.

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

This page discusses:

General Information

This opening ID is invoked while generating the protection color filling.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: EHFDrawing_ComputationProtectionFillingColor
Customization intent: Computation
Execution context: Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Segment.
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read/Write Comments
RedColorValue Integer Write Output red color value in integer
GreenColorValue Integer Write Output green color value in integer
BlueColorValue Integer Write Output blue color value in integer
OpacityValue Integer Write Output opacity value in integer

Sample

The following sample describes computation of filling color in protection.

let RColor(Integer)
let GColor(Integer)
let BColor(Integer)
let OColor(Integer)

let ProtLength(LENGTH)

RColor=255
GColor=255
BColor=0
OColor=255

ProtLength = ThisObject.Elec_Length

if(ProtLength > 50.0mm)
{
  RColor=255
  GColor=0
  BColor=0
  OColor=255
}
else
{
  RColor=0
  GColor=0
  BColor=255
  OColor=255
}

Parameters.SetAttributeInteger("RedColorValue", RColor)
Parameters.SetAttributeInteger("GreenColorValue", GColor)
Parameters.SetAttributeInteger("BlueColorValue", BColor)
Parameters.SetAttributeInteger("OpacityValue", OColor)