ReplaceTGDPicture Subroutine

Closes a Picture and replaces it with another Picture with the specified tag group file. If a picture with that specified tag group file is already open in the WorkSpace, another instance of that picture with the same tag group file opens in the WorkSpace.

Syntax

ReplaceTGDPicture NewPicture, TagGroupName, [OldPicture], [bNewInstance]

Properties

The ReplaceTGDPicture subroutine syntax has these parts:

Part

Description

NewPicture

String. The file name of the Picture you want to open.

TagGroupName

String. Tag group file name. Do not specify a path.

OldPicture

String. (Optional) The file name of the Picture you want to replace. If no picture is specified, the currently active picture is replaced.

bNewInstance

Boolean. (Optional). Describes whether the picture is a new instance. This field is useful when opening multiple pictures. If the value is set to TRUE, a new instance of the same picture is opened. If the value is set to FALSE, then a new instance of the picture is not opened. The default is FALSE.

Remarks

If possible, always make this call the last line in your script. Note that when the ReplaceTGDPicture subroutine is used, and the document being replaced is the document that contains the script, the call must be the last line in the script. Otherwise, you may experience unexpected behavior when executing the script.

If the ReplaceTGDPicture subroutine is not in the picture being replaced and is not the last line in your script, be certain that the operation is complete before the rest of the script continues to execute.

 

Example