Standard Substitution

A standard substitution is basically a search-and-replace. It searches all objects, including TheView, for a property value match and replaces the existing value with a new one.

Example

The following example shows a sample standard substitution set:

Copy
Standard Substitution
<Substitutions>
    <Set Label="Standard Substitution">
        <ReplaceFilePath OldPath="C:\CygNet\Studio\Screens\Main.csf" NewPath="\\MYSITE.BSS\SCREENS\Main.csf"/>
        <ReplaceFilePath OldPath="C:\Images\Valve_Blue.bmp" NewPath="C:\Images\Valve_Cyan.bmp"/>
        <ReplaceUDC OldUDC="PSO" NewUDC="PSTATIC"/>
        <ReplaceFacility OldFacility="Aztec" NewFacility="MESA"/>
        <ReplaceSiteService OldSiteService="YOURSITE.UIS" NewSiteService="MYSITE.UIS"/>
        <ImageToVector Image="\\MYSITE.BSS\IMAGES\HorzPipe.bmp" Vector="\\MYSITE.BSS\VECTORS\LatPipe.svg"/>
    </Set>
</Substitutions>

Standard Substitution Elements

The elements that can be used for a standard substitution are listed in the table below.

Note: A standard substitution affects only properties on the Normal page in the Properties Sheet. It does not affect Events or ActiveX Properties.

XML File Element Attributes Description

ReplaceFacility

OldFacility="Facility"

NewFacility="Facility"

Applies to the following properties:

  • [Facility] property of TheView
  • [4:Facility ID] property of objects.

ReplaceFilePath

OldPath="\\path\file.csf"

NewPath="\\path\file.csf"

Applies to all objects that have a property that includes a file path such as:

  • Standard Button Tool objects
  • Image Tool objects
  • Vector Tool objects
  • Comment Tool objects
  • Facility Alarm Tool objects.

ReplaceScheme

OldScheme="Scheme"

NewScheme="Scheme"

Special use only for Point Scheme changes. Affects the Point Scheme of state color overrides.

ReplaceService

OldService="Service"

NewService="Service"

Applies to the following properties:

  • [SiteService] property of TheView
  • [1:SiteService] property of objects.

This element replaces only the Service portion of the property value.

ReplaceSite

OldSite="Site"

NewSite="Site"

Applies to the following properties:

  • [SiteService] property of TheView
  • [1:SiteService] property of objects.

This element replaces only the Site portion of the property value.

ReplaceSiteService

OldSiteService="Site.Service"

NewSiteService="Site.Service"

Applies to the following properties:

  • [SiteService] property of TheView
  • [1:SiteService] property of objects.

This element replaces both the Site and Service portions of the property value.

ReplaceUDC

OldUDC="UDC"

NewUDC="UDC"

Applies to the [5:UDC] property of objects.

ImageToVector

Image="<\\path\image.bmp>" Vector="<\\path\image.svg>"

Applies to Image Tool objects have images that match the \\path\file name. Converts the Image Tool object to a Vector Tool object and changes the image to the specified vector.

Note: The (ObjectCode) property is not changed so it may still read "ImageTooln."

Order of substitutions in the set is unrelated to the order in which they are applied. However, if multiple substitutions of the same type match on the same string (for example, two ReplaceFilePaths that have identical OldPath attributes), then the latter will override the former.

If multiple substitutions of differing types match the same property, only the most specific match will be used. For example, if a file path matches both ReplaceFilePath and ReplaceSiteService, only ReplaceFilePath will be applied. Likewise, ReplaceSiteService trumps ReplaceSite and ReplaceService. The one exception to this rule is ImageToVector. This will be applied before other matching substitutions, but not instead of them.

Back to top