Macro Language Reference > Macros > Document > fdpref
  
fdpref
Description
Used internally in the PTC ALD.3d document file structure to specify the document preferences, normally set through the tdpref dialog box, but also used as a macro to access document preference settings directly.
 
Example 45. Change the default unit of measurement for a document
This example changes the default unit of measurement for horizontal/vertical text to points and turns strict mode on:
fdpref units 5,5,5,1
Syntax
fdpref parameter:keyw
parameter
One of the associated tdpref keywords and parameters:
s_level
parser
p_level
fmtlog
grid
colourbars
pgxy
articles
numbers
ftagspos
units
jobfreeze
rot_snap
links
ruler
showmode
col_snap
rangefreeze
line_snap
tlscroll
p_ctrl
longfontnames
gr_box_size
defstyle
gr_flatness
fontuse_onfmt
edbar
sppref
bakfile
splink
parameter (cont...)
curtrack
measuremin
cutsize
embedded_font
qclick
viewdata
spell
nsorder
objdet
ckmode
framedet
sgml_advsets
textdet
sgml_legsets
autosave
sgml_docsets
pboard
attrcase
jobfile
stylabcase
rev_info
scrlabcase
rev_ctrl
frnamecase
thumbs
anchcase
tagpfix
xml_conf
tagcase
del_opt
parameter (cont...)
preformat
trylabcase
xmlparser
profile
undomode
autotext
compstyle
fmtlevel
font_precision
attrmodes
defstream
tabcache
tagtrace
perl_mode
tagdbg
ppm
parameter (cont)
DPI settings for graphics
fdpref graphictype_dpi <x_dpi>, <y_dpi>
Available types:
gif_dpi
png_dpi
jpg_dpi
pcx_dpi
For example:
fdpref gif_dpi 96,96
Additional Information
The fdpref section of an PTC ALD.3d document can be viewed by opening the file in an ASCII editor, such as Wordpad. A sample of which is shown below:
$fdpref
$pgxy 2,2,6,1<>
$numbers 1,0<>
$units 2,2,5,1<>
$edbar 5,5,1,1,1,3,6500,1,1<>
$defstyle "","_deflt_","_deflt_","",""<>
...
* 
New preferences are being added to PTC ALD constantly so if new documentation is not yet available on a specific new fdpref preference keyword you can easily locate its name and parameters for use by fdpref direct access by switching it on in your file, saving, then looking at the fdpref section of your .3d file in a text editor.
The majority of the keywords are typecode o, therefore take a value of 0 or 1 (on or off respectively).
In PTC ALD post version 7.00 the tdpref macro has been enhanced to work in single-shot mode by taking a keyword and its settings as parameters.
 
This macro can be used to set all the preferences stored in the fdpref section of the .3d file if required. There are separate macros for the preference keywords not documented below, these being: tgpref, tdplevel, tdslevel, tdspref, and tdlpref.
Apart from the document preference macros above, there is no direct macro access to change the other preferences in pre version 7 versions of PTC ALD . The script example below illustrates a method of doing this in older versions of PTC ALD
This script is setup to change the freeze pages function for pages and page ranges. The contents of "execute freeze" tag are detailed below: this will be run by the script to change the file format of the document:
defstr 390,"Freeze modes\n"
addstr 390,"Freeze mode }^freezemode %0..1r[pages] [range]\n"
addstr 390,"|%2..1e[OK] [Cancel]
wdb 390
?=^wdb,^(1) trun 0
ttop "execute_freeze"
@fdpref
#13
@$rangefreeze ^freezemode^ 20
@<> 22
#13 24
run "{0}execute_freeze"
fdpref
$rangefreeze 1<>
Related Links