Macro Language Reference > Macros > Application > trd
  
trd
Description
Opens a read only version of a file, not allowing any changes to be made.
Syntax
trd file:s? ( start page:n ( run autoexec:n? ( load pfi:n ) ) ) file:s? ( bookmark:t? ( run autoexec:n? ( load pfi:n ) ) ) start page:n? file:s? bookmark:t? run autoexec:n? load pfi:n?
trd
[no parameter]
Invoke the Read Document(s) dialog box.
start page
Ø|0
The document will be opened either at page 1 or, if its page position has been saved using the tdspref macro, at the page it was at when last saved.
n
The page of the document to display when the document is opened
 
If you do not specify a file to edit via the file parameter, the Edit Document dialog box will be invoked with the Page Number entry box filled in with this start page.
file
The name of the file you want to open. If you include wildcard characters the Edit Document dialog box will be invoked, containing a list of matching files from which you can make a multiple selection. The wildcard can take one of four forms with reference to the information to be displayed in the dialog box, for example:
*.3d
File names only
**.3d
File names + file size
***.3d
File names + number of pages
****.3d
File names + file size + number of pages
Example: the macro shown below will list any file in the current directory with the extension .3d, plus their file sizes and the number of pages they contain (note that PTC ALD defaults to a file type of .3d if one is not specified)
ted"****
bookmark
Specifies a bookmark at which to open the document: used optionally instead of the start page parameter.
 
No warning is given if the bookmark does not exist in the opened document.
run autoexec
0
Ignore any autoexec script when the document is opened.
Ø or 1
If the document contains an autoexec script, start it after the document is fully loaded
load pfi
PTC ALD stores page formatting information (pfi) related to the beginning of each page if the Save page formatting information tick box is enabled in the Preferences for Saving Documents dialog box (see macro tdspref). This assists faster navigation of documents, especially after they are first opened. Some versions of PTC ALD have (unintentionally) saved pfi which is incompatible with other versions, rendering the document un-openable. This setting can be used to overcome this problem:
0
Ignore any pfi in the file
Ø or 1
Load any pfi in the file and use to speed navigation of the document
Additional Information
The equivalent macro to open a document for editing is the ted macro.
Related Links