Is there a better way to rename discreet display values in Visio?
<Discreets>
<Discreet>
<Display>Off</Display>
<Value>0</Value>
</Discreet>
<Discreet>
<Display>On</Display>
<Value>1</Value>
</Discreet>
</Discreets>
The discreet display value is part of the driver. When the parameter shape is displayed in Visio the discreet display value is presented (i.e. On or Off). In our case, we needed the display value to be Open or Closed rather than On, Off. In order to accomplish this we setup custom property values for STOn and STOff (Status On/Off) with the value set to 'Open' for On and 'Close' for Off. Then in the Visio shape we used shape data 'Property' with a value of 'ST[param:[this element],402,Interface_1]' which would then display the property value for STOn (Open) or STOff (Close) depending on discreet returned On or Off. This seems to be working as needed, however, the property has to be edited with each new device of the same type added.
Our question, is there a better/easier way to perform the renaming of the discreet display value without editing the driver?
If it's just to display a different value on the Visual Overview I suggest using the RegexReplace functionality (see help). With this, you are able to search a text for a regular expression and replace the matches with another piece of text.
Example:
Let's say we want to use parameter 101 of element 1/2. We can use this value in the Visual Overview using a parameter placeholder:
[Param:1/2,101]
We can use this placeholder in a RegexReplace:
[RegexReplace:On,[Param:1/2,101],Open]
This will return Open if the value is On or return the original string when it's not which will be Off.
We can now repeat this process once more to also cover Off:
[RegexReplace:Off,[RegexReplace:On,[Param:1/2,101],Open],Closed]
You can set the text of a shape to the above syntax to see the resolved value.
Thanks Sebastiaan, that is a slick solution which seems to work great.