show
Description
A showstring displays information that is created as a result of one or more evaluated processes. The <?show> command is extremely powerful and can be used to instruct PTC ALD to use information in a number of ways:
• show the information as a simple value
• write the information to a specific location such as a variable or stream
• evaluate the information as part of a process
Example 382. Examples of basic showstring use
Show the value of an xcounter:
<?show $x(99)>
Show the value of a variable:
<?show $^variable>
Show the value of the "id" attribute to a variable:
<?show "^var"$^id#>
Add the extracted value of the xcounter and the text into the top of text stream called "stream":
<?show -"stream"The value is $x(10)>
Evaluate and display the perl function variable:
<?show $^[perl $name_value=~s/ä/a/g;]>
Syntax
<?show ('- | +' ('"' destination:t '"' ) (';' '"' source:t '"' )? )? ( string:t ( string:t )+ )>
<?show>
- | +
|
A - or + character preceding a destination will place the resulting string to the start (-) or end (+) of the destination stream or variable
|
destination
|
The destination stream (or variable if specified with a ^) to which the evaluated or direct stream will be shown (written)
|
source
|
The name of the source stream that is to be copied into the destination stream (optional).
|
string
|
The type of show string information to be used. The items and features that can be used inside a show string PI command is vast. This following list is representative of some of the more common uses:
x(0)
|
x counter display and manipulations. These are normally inserted into a stream via the > menu
|
$^name
|
Variable display and manipulation
|
$^name#
|
Attribute value display and manipulation
|
$^!
|
XPath expressions
|
v0000
|
Getvar display and manipulation
|
$^[name parm]
|
Function variable calls
|
"*mini"
|
Mini script calls (used mainly before the introduction of function variables)
|
$y"/this/ct"
|
Yank text with search 'up to' function
|
[?command]
|
PTC ALD PI
|
$60#?show $62#
|
2nd/3rd..etc. nested showstrings
|
[$$]\\raster(50%, p)==":1::C:/my image.jpg"[$$]
|
Raster graphics
|
?+^(^varA), ^(^varB)
|
Expressions
|
|
Additional Information
For more information about showstring use, see Reference Chapter: Showstrings.
Related Links