General InformationThis opening ID is invoked when you:
This opening ID is used to customize the color of an insulation based on the type of a feature on which insulation is applied.
Input ObjectsInput objects must be of the following types:
SampleThe following sample assigns color to an insulation as per the type of the feature. /*
ThisObject Type = VPMReference
Parameters Type = RuleContext
*/
/* Initialize Input featue*/
let INS_PanelInsulation(InsStrPanelInsulationFeature)
let INS_ProfileInsulation(InsStrProfileInsulationFeature)
let RValue(Integer)
let GValue(Integer)
let BValue(Integer)
set INS_PanelInsulation = Parameters.GetAttributeObject("INSFeatureType")
set INS_ProfileInsulation = Parameters.GetAttributeObject("INSFeatureType")
if(NULL <> INS_PanelInsulation)
{
//Check the childrens first and go to top in hierarchy
if(INS_PanelInsulation.IsASortOf("DeckInsulation"))
{
RValue = 0
GValue = 128
BValue = 128
}
else if(INS_PanelInsulation.IsASortOf("BulkheadInsulation"))
{
RValue = 255
GValue = 255
BValue = 0
}
else if(INS_PanelInsulation.IsASortOf("LBHeadInsulation"))
{
RValue = 0
GValue = 128
BValue = 0
}
else if(INS_PanelInsulation.IsASortOf("TBHeadInsulation"))
{
RValue = 129
GValue = 192
BValue = 232
}
else
{
RValue = 211
GValue = 178
BValue = 125
}
}
if(NULL <> INS_ProfileInsulation)
{
//Check the childrens first and go to top in hierarchy
if(INS_ProfileInsulation.IsASortOf("DeckStiffenerInsulation"))
{
RValue = 0
GValue = 128
BValue = 128
}
else if(INS_ProfileInsulation.IsASortOf("BulkheadStiffenerInsulation"))
{
RValue = 255
GValue = 255
BValue = 0
}
else if(INS_ProfileInsulation.IsASortOf("LBHeadStiffenerInsulation"))
{
RValue = 0
GValue = 128
BValue = 0
}
else if(INS_ProfileInsulation.IsASortOf("TBHeadStiffenerInsulation"))
{
RValue = 129
GValue = 192
BValue = 232
}
else if(INS_ProfileInsulation.IsASortOf("MemberInsulation"))
{
RValue = 0
GValue = 178
BValue = 125
}
else
{
RValue = 211
GValue = 178
BValue = 125
}
}
Parameters.SetAttributeInteger("oRValue", RValue)
Parameters.SetAttributeInteger("oGValue", GValue)
Parameters.SetAttributeInteger("oBValue", BValue)
| |||||||||||||||