General InformationThis opening ID is used to customize the color of segments. It is invoked whenever you set or edit the separation code or the subtype of a segment. The opening ID in not invoked in the following cases:
Note:
After the customization, you can edit the computed color manually.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample illustrates how to specify a color on segments depending on their separation code and subtype. In this example, the color is specified in the segment's separation code and is computed according to the subtype. If the segment has a "Low Tension" subtype, its color is light. If the segment has a "High Tension" subtype, its color is dark. Let SepCode(String)
Let SubType(String)
Let R(Integer)
Let G(Integer)
Let B(Integer)
Set SepCode = ThisSegment.Elec_Segreg
Set SubType = ThisSegment.Elec_SubType
if(SubType == "High Tension")
{
if(SepCode == "Red")
{
Set R = 255
Set G = 0
Set B = 0
}
else if(SepCode == "Green")
{
Set R = 0
Set G = 157
Set B = 0
}
else if(SepCode == "Blue")
{
Set R = 0
Set G = 0
Set B = 255
}
}
else if(SubType == "Low Tension")
{
if(SepCode == "Red")
{
Set R = 255
Set G = 100
Set B = 100
}
else if(SepCode == "Green")
{
Set R = 0
Set G = 255
Set B = 0
}
else if(SepCode == "Blue")
{
Set R = 100
Set G = 100
Set B = 255
}
}
Parameters.SetAttributeInteger("Red",R)
Parameters.SetAttributeInteger("Green",G)
Parameters.SetAttributeInteger("Blue",B) | ||||||||||||||||||||||||||||||||||||