General InformationThis opening ID is invoked when you create an accommodation design feature, or edit its material, thickness, or category.
Input ObjectsInput objects must be of the following types:
SampleThe following sample explains the business rule for applying color and transparency to various accommodation design objects. /* ThisObject Type = FeatureVPMReference Parameters Type = RuleContext */ /* Initialize Input featue*/ let AGT_Wall(AGTWall) let AGT_Covering(AGTCovering) let AGT_Ceiling(AGTCeiling) let AGT_Sill(AGT2Sill) let AGT_Connector(AGT2Connector) let AGT_Covering_Panel_Set(AGT2CoveringPanelSet) let Category(String) let MyMaterial(String) let MyColor(String) let RValue(Integer) let GValue(Integer) let BValue(Integer) let AValue(Integer) /*Initialize to invalid values (<0 or >255) so that these are returned by default*/ RValue = 999 GValue = 999 BValue = 999 AValue = 255 set AGT_Wall = Parameters.GetAttributeObject("AGTFeatureType") set AGT_Ceiling = Parameters.GetAttributeObject("AGTFeatureType") set AGT_Covering = Parameters.GetAttributeObject("AGTFeatureType") set AGT_Sill = Parameters.GetAttributeObject("AGTFeatureType") set AGT_Connector = Parameters.GetAttributeObject("AGTFeatureType") set AGT_Covering_Panel_Set = Parameters.GetAttributeObject("AGTFeatureType") /* Retrieve the Category from Feature */ if( NULL <> AGT_Wall) { if(AGT_Wall->IsASortOf("CabinAreaWall")) { RValue = 0 GValue = 255 BValue = 0 } else if(AGT_Wall->IsASortOf("PublicAreaWall")) { RValue = 110 GValue = 110 BValue = 255 } else if(AGT_Wall->IsASortOf("ServiceAreaWall")) { RValue = 0 GValue = 110 BValue = 110 AValue = 150 } else { RValue = 255 GValue = 0 BValue = 0 } } if( NULL <> AGT_Ceiling) { if(AGT_Ceiling->IsASortOf("CabinAreaCeiling")) { RValue = 0 GValue = 67 BValue = 100 } else if(AGT_Ceiling->IsASortOf("PublicAreaCeiling")) { RValue = 50 GValue = 86 BValue = 98 } else if(AGT_Ceiling->IsASortOf("ServiceAreaCeiling")) { RValue = 0 GValue = 86 BValue = 98 } else { RValue = 100 GValue = 110 BValue = 100 } } if( NULL <> AGT_Covering) { if(AGT_Covering->IsASortOf("PublicAreaCovering")) { RValue = 100 GValue = 67 BValue = 100 } else if(AGT_Covering->IsASortOf("CabinAreaCovering")) { RValue = 100 GValue = 167 BValue = 100 } else if(AGT_Covering->IsASortOf("ServiceAreaCovering")) { RValue = 110 GValue = 86 BValue = 0 } else { RValue = 60 GValue = 100 BValue = 100 } } if( NULL <> AGT_Sill) { if(AGT_Sill->IsASortOf("GenericSill")) { RValue = 100 GValue = 67 BValue = 100 } else if(AGT_Sill->IsASortOf("WallSill")) { RValue = 100 GValue = 167 BValue = 100 } else { RValue = 60 GValue = 100 BValue = 100 } } if( NULL <> AGT_Connector) { if(AGT_Connector->IsASortOf("GenericConnector")) { RValue = 100 GValue = 67 BValue = 100 } else if(AGT_Connector->IsASortOf("WallConnector")) { RValue = 100 GValue = 167 BValue = 100 } else { RValue = 60 GValue = 100 BValue = 100 } } if( NULL <> AGT_Covering_Panel_Set) { MyMaterial = AGT_Covering_Panel_Set.Material if(MyMaterial like "White Tile") { RValue = 255 GValue = 0 BValue = 0 } else if (MyMaterial like "Persian carpet") { RValue = 0 GValue = 255 BValue = 0 } else if (MyMaterial like "Oak") { RValue = 0 GValue = 0 BValue = 255 AValue = 110 } } Parameters.SetAttributeInteger("oRValue", RValue) Parameters.SetAttributeInteger("oGValue", GValue) Parameters.SetAttributeInteger("oBValue", BValue) Parameters.SetAttributeInteger("oAValue", AValue) |