RTEXT (Express Tool)

Creates remote text (rtext) objects.


You can use an rtext object as a file reference to display text, such as a sheet note or a legal disclaimer, that is common to several drawings. You can also use it to display larger bodies of text such as specifications or assembly instructions.

Also called reactive text objects, remote text objects are displayed the same way AutoCAD text and mtext objects are displayed, however the source for the text is either an external text file or the value of a DIESEL expression. You can edit an rtext object with the RTEDIT command.

Note: If a drawing with an rtext object is opened on a computer that does not have RTEXT installed, the proxy object that results displays the bounding box of the rtext object. If you plan to share your drawing with someone who does not have RTEXT, use the EXPLODE command to convert rtext objects to mtext objects.
Command: RTEXT
Current text style: STANDARD  Text height: 0.2000  Text rotation: 0
Enter an option [Style/Height/Rotation/File/Diesel] <Diesel>: Specify an option


Style Select a text style.
Height Specify a text height.
Rotation Specify a rotation value.
File Use an external text file.
Diesel Use DIESEL code.
Tip: Once you have created an rtext object with the File option, you can identify the associated text file with the LIST command.

Using DIESEL Expressions

DIESEL provides options previously accessible only with custom programs. Here are some examples of how rtext objects containing DIESEL expressions can be used in your drawings. You can paste these examples into the DIESEL Expression dialog box.

Using the GETVAR Function

To display the drawing name 102-fp12.dwg, use the following expression:

Drawing file: $(getvar, "dwgname")

The resulting rtext object appears as follows:

Drawing file: 102-fp12.dwg

To include the folder path with the file name:

Drawing name: $(getvar, "dwgprefix")$(getvar, "dwgname")

The resulting rtext object appears as follows:

Drawing file: C:\Projects\97-102\Arch\102-fp12.dwg
Note: If you reference the drawing path or name in a standard title block, it will always display the file name of the drawing, even if the title block appears in an xref file.

Using the EDTIME Function

When you plot a drawing, you might want the output to show the date and the time that the plot was created. The following DIESEL expression displays this information in your drawing:

$(edtime, 0, MON DD","  YYYY - H:MMam/pm)

The resulting rtext object appears as follows:

Mar 22, 2000 - 11:12pm

Using the GETPROP Function

Rtext supports drawing properties through a locally defined $(getprop) DIESEL function. With $(getprop) , values from the tabs in the Drawing Properties dialog box (DWGPROPS command) can be extracted and displayed in rtext objects. The syntax for the $(getprop) function is:

$(getprop, property name)
where property name can be any of the following fields from the dialog box:
Custom Property

For example, if the drawing properties for a drawing contains the text "Excavated Site" in the Subject field, the DIESEL expression:

Subject: $(getprop, subject)

in an rtext object will display as:

Subject: Excavated Site
Note: The $(getprop) function is supported only in rtext objects. Unlike arguments supplied to other DIESEL functions, arguments to $(getprop) cannot be quoted. Arguments are not case sensitive.

If you have a custom property called Project Name, the following DIESEL expression will display the value:

Project: $(getprop, %PROJECT NAME)
Note: Errors in using $(getprop), such as improper syntax or bad arguments, will display (GETPROP ERROR). If a nonexistent custom property name is used, $(getprop) will display an empty string.

Using the XREFS Function

Rtext supports listing xref files attached to a drawing using the $(xrefs) function with the following syntax:
$(xrefs [, flags [, leader [, trailer]]])
flags A collection of bitflags with the following meanings: 1 = (default) include Xref file name (not exclusive with flag 2), 2 = include Xref block name (not exclusive with flag 1), 4 = don't display file name extension, 8 = don't display path, 16 = show nesting with additional spacing
leader A text string inserted before each Xref entry.
trailer A text string appended to each Xref entry except the last.

For example, the rtext DIESEL expression:


displays a list of xrefs in the following format:

B-ELEC [c:\proj-14\b-elec.dwg]
M-ELEC [c:\proj-14\m-elec.dwg]
R-ELEC [c:\proj-14\r-elec.dwg]
F-ELEC [c:\proj-14\f-elec.dwg]

while the expression:

$(xrefs,2,Includes: )

lists the xrefs as:

Includes: B-ELEC
Includes: M-ELEC
Includes: R-ELEC
Includes: F-ELEC

Using the IMAGES Function

Rtext supports listing images attached to the drawing through the $(images) function. The syntax for the function is:

$(images [, flags [, leader [, trailer]]])
flags A collection of bitflags with the following meanings: 4 = do not display file name extension, 8 = do not display path
leader A text string inserted before each Image entry.
trailer A text string added each Image entry except the last one.

The behavior of the $(images) function is similar to that of the $(xrefs) function.

Using the GETREC Function

RText supports displaying xrecord data through the $(getrec) function. The syntax for the function is:

$(getrec, key, code)
key Entry name in the Named Object Dictionary.
code Group code to extract.

The $(getrec) function extracts a value from an Xrecord by looking in the Named Object Dictionary for key, then for a data value associated with code. Currently, only group codes in the ranges 1-9 (string), 40-59 (real), 60-79 (integer) and 300-309 (string) are supported.


rtext.lsp, rtext.arx