Introduction
Usage : Drive the Symbol representation display in diagram based on attribute value
Datasetup Resource Set :
- Diagram Resource
Datasetup Resource : Rule for alternative representation name
Limitation
Today in 23x, it seems that the representation can be driven only by an instance attribute (and not a reference Attribute)
Rule example 1
Description
Rule to drive Instrument representation display. Alternate symbol is driven by Value in description attribute : description string = alternate symbol name
- Mount-In-Room
- Mount-Out-of-Sight
- Mount-In-Field
Prereq : define symbol alternate representations
Rule
let IntrumentInst(Piping_Logical_Instrument_Inst) set IntrumentInst = ThisObject.Instance if(IntrumentInst <> NULL) { let sLocation(String) let sAlternativeRepName(string) set sLocation = IntrumentInst.GetAttributeString("V_description") if(sLocation.Search("In") <> -1) { sAlternativeRepName = "Mount-In-Room" } else if(sLocation.Search("Out") <>-1) { sAlternativeRepName = "Mount-Out-of-Sight" } else { sAlternativeRepName = "Mount-In-Field" } Parameters.SetAttributeString("AlternativeRepName", sAlternativeRepName) }
3DXML