Macro Language Reference > Macros > System > addstr
  
addstr
Description
Adds data to a string, either by defining the line that should be included or instructing PTC ALD to copy the contents of another string into the current one.
 
Example 211. Copy content of one string to another string
This example copies the content of string number 1007 to string number 390.
addstr 390,1007
 
Example 212. Add a new line to a user defined string
The example below adds a new line to string 390, a user-defined string set via the defstr macro.
addstr 390,"Line in dialogue box with entry field}^var %1..
20s\n"
 
Note the use of the \n line break character at the end of the new line.
Syntax
addstr string:n extra data:s exact:n?
addstr string1:n string2:n
string
The number of the string to which the data from the extra data parameter will be added.
extra data
The string of extra data that will be added to the string specified by the string parameter.
exact
Ø|0
Process characters in extra data: for example, \n is converted to a new line, \\ is a single backslash.
1
Do not process characters in extra data: for example, leave a file path that contains backslashes exactly as it appears.
string1
The number of the original string.
string2
The number of the string to be appended to string1.
Additional Information
 
addstr does not check to see whether or not it has already added a string to another. Be sure to use defstr to reset a string to a default setting or your menu or dialog box strings may show the same item repeatedly.
* 
Available user string numbers are set and only numbers within the specified ranges can be used. If other numbers are used you run the risk of conflicting with PTC ALD own strings and causing problems or crashes. See defstr for more details.
Related Links