GetPreference() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the value of the specified preference. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

GetPreference ( segment, ordinal )

segment is positive integer representing one of the options or preferences that can be set via the user interface. The segment names are similar but not identical to the names in the user interface.

ordinal is a positive integer code indicating which preference within the segment you wish to retrieve.

Return Value

Return type depends on the particular preference requested.

Description

Given the preference segment and an ordinal within that segment the preference setting is returned. The type returned depends on the specific preference reqested.

The segment parameter can be any value from the table below. Codes in the left column are defined in MAPBASIC.DEF .

segment code ID Meaning
PREFERENCE_SYSTEM 0 System Preferences.
PREFERENCE_TABLES 1 Table Preferences
PREFERENCE_BROWSER 3 Browser window Preferences
PREFERENCE_MAPPER 4 Mapper window Preferences
PREFERENCE_INTERNATIONAL 6 Address Matching Preferences
PREFERENCE_PATHS 11 Directory Preferences
PREFERENCES_LEGEND 12 Legend window Preferences
PREFERENCES_OUTPUT 13 Output setting preferences
PREFERENCES_PRINTER 14 Printer Preferences
PREFERENCES_WEBSERVICES 15 Web Services Preferences
PREFERENCES_IMAGE_PROCESSING 16 Image Processing Preferences
PREFERENCES_LAYOUT 17 Layout window Preferences
PREFERENCES_PDF 18 PDF Printer preferences
PREFERENCES_PERFORMANCE 19 Performance Preferences
PREFERENCES_MANAGED_WORKSPACE 50 Workspace Preferences

The ordinal parameter can be any value from the table below. Codes in the left column are defined in MAPBASIC.DEF.

Return values are SmallInteger unless otherwise indicated.
Note: Some Preference Ordinals are omitted as they reference obsolete preferences no longer used or supported.
ordinal ID GetPreference() returns
PREF_SYSTEM_COLORDEFAULT 0 0 = Monitor, 1= Black&White, 2 = Color
PREF_SYSTEM_AUTOSAVEWORKSPACE 3 AutoSave workspace 0=ON, 1=OFF
PREF_SYSTEM_COPYTEXTCLIPBOARD 7 Copy Text t Clipboard 0=ON, 1=OFF
PREF_SYSTEM_COPYGRAPHICSCLIPBOARD 8 Copy BMP to clipboard 0=ON, 1=OFF
PREF_SYSTEM_PAPERUNITS 9

11 = Points

12 = Picas

2 = Inches

5 = Millimeters

6 = Centimeters

PREF_SYSTEM_UNDO_COUNT 10 Number of Undo objects
PREF_SYSTEM_SUBSTITUTETTFONT 12 Display Pre-version 4 symbols
PREF_SYSTEM_COPY_EMF_CLIPBOARD 13 Copy EMF to clipboard 0=ON, 1=OFF
PREF_SYSTEM_COPY_OLEOBJECT 14 Copy MapInfo Map Object to clipboard 0=ON, 1=OFF - disabled in x64
PREF_SYSTEM_SAVEQUERYWORKSPACE 18 Save Queries in Workspaces 0=ON, 1=OFF
PREF_SYSTEM_DATEWINDOW 19 SmallInt: 1 = Use Current Century, else Year value
PREF_SYSTEM_UNDO_SIZE 20 memory size in bytes for Undo
PREF_SYSTEM_RESOLUTION 21 Export resolution in dpi
PREF_SYSTEM_VMOPTION 22 0 = GRID, 1= Raster, 2 = Default
PREF_SYSTEM_DISTANCEUNITS 23

Returns Distance Unit constant

2 = Inches

30 = Links

3 = Feet

8 = US Survey Feet

4 = Yards

32 = Rods

31 = Chains

0 = Miles

9 = Nautical Miles

5 = Millimeters

6 = Centimeters

7 = Meters

1 = Kilometers

PREF_SYSTEM_AREAUNITS 24

Returns Area Units constant

16 = Square Inches

33 = Square Links

17 = Square Feet

18 = Square Yards

35 = Square Rods

36 = Perches

34 Square Chains

37 = Roods

28 = Acres

14 = Square Miles

23 = Square Nautical Miles

19 = Square Millimeters

20 = Square Centimeters

21 = Square Meters

29 = Hectares

15 = Square Kilometers

PREF_SYSTEM_COPY_OLEOBJECT_NEW 25 Copy EMF to clipboard 0=ON, 1=OFF
PREF_SYSTEM_COPY_ENHANCED_EMF_TYPE 26 0 = EMF, 1= EMF+, 2 = EMF+Dual
PREF_SYSTEM_CROSSHAIRCURSOR 28 138 = Medium crosshair, 164 = Large, 165 = Default
PREF_SYSTEM_COPY_WMF_CLIPBOARD 29 Copy WMF to clipboard 0=ON, 1=OFF
PREF_SYSTEM_TRUECOLORCURSORS 30 Enable true color cursors 0=ON, 1=OFF
PREF_SYSTEM_WRITETOOLWINDOWSTOWORKSPACE 31 Save Tool Window positions to workspaces 0=ON, 1=OFF
PREF_SYSTEM_MULTIPLETOUCH 32 Support touchscreen 0=ON, 1=OFF
PREF_SYSTEM_DEFAULTFILEFORMAT 33

SmallInt result, representing the default table format for new tables.

5 for MapInfo (Native)

14 for MapInfo Extended (NativeX)

PREF_SYSTEM_DEFAULTCHARSETFORNATIVEX 34 String result, representing the default character set used when creating MapInfo Extended tables (such as UTF-8 or WindowsLatin).
PREF_SYSTEM_WRITEUNICODEDATA 35 SmallInt result, 1 if Encode Workspaces and Tab Files is enabled.
Workspace Preference Ordinal ID GetPreference Returns
PREF_WKS_PROMPTTOSAVE 1 0 = OFF, 1=ON
PREF_WKS_PROMPTTOSAVEOPTION 2 0 = Automatic, 1 = Only when WOR is open
Table Preference Ordinal ID GetPreference Returns
PREF_TABLES_FILEOPENWHAT 0 Last Preferred View Used
PREF_TABLES_OPENCHOICESCREEN 1 QuickStart dialog
PREF_TABLES_CONNNAME 2 String: Default DBMS Connection name
PREF_TABLES_CONNDRIVER 3 String: DBMS Driver Name
PREF_TABLES_CONNSTRING 4 String: DBMS Connection Name
Browser Preference Ordinal ID GetPreference Returns
PREF_BROWSER_RDTSORTORDER 0 Redistricter Sort Order. 0=MRU, 1=Alphabetical, 2=No Ordering
PREF_BROWSER_ALTROWCOLORRED 1 SmallInt: RGB Component Red color
PREF_BROWSER_ALTROWCOLORGREEN 2 SmallInt: RGB Component Green color
PREF_BROWSER_ALTROWCOLORBLUE 3 SmallInt: RGB Component Blue color
Mapper Preference Ordinal ID GetPreference Returns
PREF_MAPPER_PRESERVESCALEONRESIZE 0 0=Fit to Map, 1 = Preserve Scale
PREF_MAPPER_HIGHLIGHT_BRUSH 2 Brush clause for Selection
PREF_MAPPER_SNAPTONODES 3 Snap to Nodes 0=Off,1=ON
PREF_MAPPER_MOVEDUPLICATENODES 4 0 = None of the Layers, 1= Same Layer
PREF_MAPPER_PIXELTOLERANCE 5 SmallInt: Snap Tolerance in pixels
PREF_MAPPER_TARGET_PEN 7 Pen clause for Target objects
PREF_MAPPER_TARGET_BRUSH 8 Brush clause for Target objects
PREF_MAPPER_HIGHLIGHT_PEN 9 Pen Clause for Selection
PREF_MAPPER_SCROLLBARS 10 Show Scrollbars 0=Off,1=ON
PREF_MAPPER_SAVECOSMETIC 11 Warn prior to loss of Cosmetic objects 0=Off,1=ON
PREF_MAPPER_SAVELABELS 12 Warn prior to loss of Map Labels 0=Off,1=ON
PREF_MAPPER_SAVETHEMATIC 13 Warn prior to loss of Thematic layers 0=Off,1=ON
PREF_MAPPER_SHOWINFOTIPS 14 Show Info Tips in Layers 0=Off,1=ON
PREF_MAPPER_DISTANCETYPE 15 Distance/Area using: '0=Spherical, 1=Cartesian
PREF_MAPPER_SHOWDEGREESMINUTESSECONDS 16 SmallInt: Returns MAPPER_INFO_DISPLAY_DMS defines
PREF_MAPPER_LASTTHEMETYPE 17 String: Last Default theme type used
PREF_MAPPER_GRIDOUTPUTFORMATHANDLER 18 String: Handler for New Grids
PREF_MAPPER_CLIPREGIONTYPE 19 SmallInt: Returns MAPPER_INFO_CLIP_TYPE defines
PREF_MAPPER_3DHARDWARE 20 Enable Hardware Acceleration for 3D map windows, 0=Off,1=ON
PREF_MAPPER_AUTORASTERZOOMLAYER 21 Raster Zoom Layering 0=Off,1=ON
PREF_MAPPER_AUTOGRIDZOOMLAYER 22 Grid Zoom Layering 0=Off,1=ON
PREF_MAPPER_POINT_HIGHLIGHT_BRUSH 23 Brush Clause for Multipoint Selection
PREF_MAPPER_POINT_TARGET_BRUSH 24 Brush Clause for Multipoint Targets
PREF_MAPPER_AUTOSCROLL 25 AutoScroll 0=Off,1=ON
PREF_MAPPER_DEFAULTPROJECTION 26 String: Table Projection Preference
PREF_MAPPER_DEFAULTMBPROJECTION 27 String: Session Projection Preference
PREF_MAPPER_DISPLAYSNAPRADIUS 28 SmallInt: Value for Snap Radius
PREF_MAPPER_CARTOGRAPHICSCALE 29 Cartographic Scale 0=Off,1=ON
PREF_MAPPER_DISPLAYLAYERCONTROLTOOLTIPS 30 Layer Control ToolTips 0=Off,1=ON
PREF_MAPPER_AUTONODETOLERANCE 31 SmallInt: Value for AutoNode Tolerance
PREF_MAPPER_DRAWLAYERSUNDERTHEMES 32 Draw Layers under themes 0=Off,1=ON
PREF_MAPPER_READDEFAULTTHEMEMETADATA 33 Read Default thematic metadata when opening tables. 0=Off,1=ON
PREF_MAPPER_FINDSELECTIONAFTERPASTE 34 Pan to selection after pasting object 0=Off,1=ON
PREF_MAPPER_ZOOMONFINDSELECTION 35 Zoom to extents of selected object 0=Off,1=ON
PREF_MAPPER_ALPHAHIGHLIGHT 36 Translucency value where 255 =100% opaque, 0= transparent
PREF_MAPPER_ZOOMMOUSEWHEELONCURSOR 37 Mousewheel zoom based on cursor location 0=Off,1=ON
PREF_MAPPER_ADORNAUTOMATICSCALING 38 Use automatic sizing for Adornments 0=Off,1=ON
PREF_MAPPER_ADORN_BACKGROUND_BRUSH 39 Brush clause for Adornment backgrounds
PREF_MAPPER_ADORN_BACKGROUND_PEN 40 Pen clause for Adornment backgrounds
International Preference Ordinal ID GetPreference Returns
PREF_INTERNATIONAL_ADDRMATCH 0 0=House number BEFORE Street, 1=House number AFTER street
PREF_INTERNATIONAL_INSET 1 Inset value in Distance Units
PREF_INTERNATIONAL_OFFSET 2 Offset value in Distance Units
PREF_INTERNATIONAL_DISTUNIT 3 Returns define for Distance units. See PREF_SYSTEM_DISTANCEUNITS
PREF_INTERNATIONAL_ENABLEDISTANCESPECIFIED 4 SmallInt Inset address percentage value
PREF_INTERNATIONAL_INSET_DIST 5 SmallInt Inset Distance value
PREF_INTERNATIONAL_INSET_DIST_DISTUNIT 6 Returns Inset define for Distance units. See PREF_SYSTEM_DISTANCEUNITS
PREF_INTERNATIONAL_USER_CLEAN 7 Substitutions from MAPINFOW.ABB file 0=Off,1=ON
PREF_INTERNATIONAL_CLOSE_ADDR 8 Use Closest Address Number 0=Off,1=ON
PREF_INTERNATIONAL_ALT_BDY 9 Use Match found in a Different Boundary 0=Off,1=ON
Path Preference Ordinal ID GetPreference Returns
PREF_PATH_MITABLEPATH 0 New Table Directory
PREF_PATH_MIWORKSPACEPATH 1 New Workspace Directory
PREF_PATH_MIPROGRAMPATH 2 MapBasic Programs Directory
PREF_PATH_MIDATAPATHS 3 Alternate Search path if PREF_PATH_USETRAVERSAL =1
PREF_PATH_USETRAVERSAL 4 SmallInt: 0= No alternate search path, 1 = Use alternate search path
PREF_PATH_CUSTOMSYMBOLPATH 5 Custom Symbols Directory
PREF_PATH_IMPORTPATH 6 Import FIles Directory
PREF_PATH_SQLQUERYPATH 7 SQL Queries Directory
PREF_PATH_THEMETEMPLATEPATH 8 Theme Templates Directory
PREF_PATH_MIQUERYPATH 9 Saved Queries Directory
PREF_PATH_NEWGRIDPATH 10 New Grid Files Directory
PREF_PATH_REMOTETABLEPATH 13 DBMS Tables Directory
PREF_PATH_TABLESFROMSHAPEFILES 14 ShapeFile Table Directory
PREF_PATH_TABLESFROMWFS 15 WFS Table Directory
PREF_PATH_TABLESFROMWMS 16 WMS Table Directory
PREF_PATH_LAYOUTIMAGES 17 Layout Images Directory
Legend Preference Ordinal ID GetPreference Returns
PREF_LEGEND_FNTTITLE 0 Font clause for Legend Title
PREF_LEGEND_FNTSUBTITLE 1 Font clause for Legend Subtitle
PREF_LEGEND_FNTSTYLE 2 Legend Category Font clause
PREF_LEGEND_PENBORDER 3 Legend Category Pen clause
PREF_LEGEND_TITLEPATTERN 4 Legend Title Background brush clause
PREF_LEGEND_SUBTITLEPATTERN 5 Legend Subtitle Background brush clause
PREF_LEGEND_STYLEPATTERN 6 Legend Category Background brush clause
PREF_LEGEND_STYLESIZE 7 Legend Swatch Style sizes. 0=Small, 1=Large swatches
PREF_LEGEND_PROMPTSAVEWORKSPACE 8 Prompt for Legend changes in workspaces 0=Off, 1=On
PREF_LEGEND_CREATEPRE1150LEGENDS 9 Create version 1150 Legends. Obsolete for x64
PREF_LEGEND_PAPERUNITS 10 Returns PREF_SYSTEM_PAPERUNITS
PREF_LEGEND_SYNCDISPLAY 11 Increase Sample size to match font. 0=Off, 1=On
PREF_LEGEND_LINEWIDTH 12 SmallInt Sample line width
PREF_LEGEND_REGIONWIDTH 13 SmallInt Sample region width
PREF_LEGEND_REGIONHEIGHT 14 SmallInt Sample region height
PREF_LEGEND_DISPLAYGRID 15 Display grid 0=Off, 1=On
PREF_LEGEND_SNAPGRID 16 Show snap Grid 0=Off, 1=On
PREF_LEGEND_AUTOUPDATE 17 Auto Update of Legend: 0=Off, 1=On
PREF_LEGEND_GRIDCOLORALPHA 18 SmallInt: Where 255 =100% opaque, 0= transparent
PREF_LEGEND_GRIDCOLORRED 19 SmallInt: Red Color component of RGB value
PREF_LEGEND_GRIDCOLORGREEN 20 SmallInt: Green Color component of RGB value
PREF_LEGEND_GRIDCOLORBLUE 21 SmallInt: Blue Color component of RGB value
PREF_LEGEND_GUIDECOLORALPHA 22 SmallInt: where 255 =100% opaque, 0= transparent
PREF_LEGEND_GUIDECOLORRED 23 SmallInt: Red Color component of RGB value
PREF_LEGEND_GUIDECOLORGREEN 24 SmallInt: Green Color component of RGB value
PREF_LEGEND_GUIDECOLORBLUE 25 SmallInt: Blue Color component of RGB value
PREF_LEGEND_AUTOFONTSIZESETTING 26 Increase sample size with font 0=Off, 1=On
Output Preference Ordinal ID GetPreference Returns
PREF_OUTPUT_USETRUECOLORDISPLAY 0 Raster True Color 0=Off, 1=On
PREF_OUTPUT_DITHERMETHODDISPLAY 1 1=Halftone, 2 = Error Diffusion
PREF_OUTPUT_PRINTMETHOD 2 0=Direct to Device, 1=EMF method, 2=OSBM
PREF_OUTPUT_PRINTBORDER 3 Print Border 0=Off, 1=On
PREF_OUTPUT_TRANSPWHENPRINTVECTOR 5 Internal print handling for transparent vector 0=Off, 1=On
PREF_OUTPUT_USETRUECOLORPRINT 6 Print in True Color 0=Off, 1=On
PREF_OUTPUT_DITHERMETHODPRINT 7 Print Dither Method 1=Halftone, 2 = Error Diffusion
PREF_OUTPUT_EXPORTBORDER 8 Export Border 0=Off, 1=On
PREF_OUTPUT_TRANSPWHENEXPORTRASTER 9 Internal export handling for transparent Raster 0=Off, 1=On
PREF_OUTPUT_TRANSPWHENEXPORTVECTOR 10 Internal export handling for transparent Vector 0=Off, 1=On
PREF_OUTPUT_USETRUECOLOREXPORT 11 Export in True Color 0=Off, 1=On
PREF_OUTPUT_DITHERMETHODEXPORT 12 Export Dither Method 1=Halftone, 2 = Error Diffusion
PREF_OUTPUT_ROPTRANSPWHENPRINTINGRASTER 13 Use ROP method when Printing Raster 0=Off, 1=On
PREF_OUTPUT_ROPTRANSPWHENEXPORTINGRASTER 14 Use ROP method when Exporting Raster 0=Off, 1=On
PREF_OUTPUT_SCALEPATTERNSPRINT 15 Scale Fill Patterns fro Printing 0=Off, 1=On
PREF_OUTPUT_USEANTIALIASING 16 Use AntiAliasing 0=Off, 1=On
PREF_OUTPUT_ANTIALIASINGTHRESHOLD 17 Threshold value used for Antialiasing
PREF_OUTPUT_ANTIALIASINGMASKSIZE 18 Mask size value for Antialiasing 0=Off, 1=On
PREF_OUTPUT_ANTIALIASINGFILTER 19 See return Defines from WIN_INFO_EXPORT_FILTER
PREF_OUTPUT_DISPLAYPOLYGONMODE 20 Use Polygon mode for Display 0=Off, 1=On
PREF_OUTPUT_PRINTINGPOLYGONMODE 21 Use Polygon mode for printing 0=Off, 1=On
PREF_OUTPUT_EXPORTINGPOLYGONMODE 22 Use Polygon mode for exporting 0=Off, 1=On
PREF_OUTPUT_SUBDIVIDEPRINTING 23 Subdivide print output 0=Off, 1=On
PREF_OUTPUT_CLARIFYTEXTOVERWYSIWYG 24 Export Clarified Text 0=Off, 1=On
PREF_OUTPUT_DISPLAYPOINTSFAST 25 Use Fast Symbol Rendering 0=Off, 1=On
Printer Preference Ordinal ID GetPreference Returns
PREF_PRINTER_USESPECIFICPRINTER 0 0=Windows default printer, 1 = MapInfo printer
PREF_PRINTER_PAPERSIZE 1 See PaperSize.Def for return values, e.g.: 1=Letter, 2=Legal
PREF_PRINTER_ORIENTATION 2 See WIN_INFO_PRINTER_ORIENT
PREF_PRINTER_PRINTERNAME 3 String: Printer Name
PREF_PRINTER_SAVEPRINTERINTOWORKSPACE 4 Save Printer info in WOR 0=Off, 1=On
PREF_PRINTER_RESTOREPRINTERFROMWORKSPACE 5 Restore printer info from WOR 0=Off, 1=On
Web Services Preference Ordinal ID GetPreference Returns
PREF_WEBSERVICES_WFSCONNECTTIMEOUT 0 SmallInt: Connect timeout in seconds
PREF_WEBSERVICES_WFSSENDTIMEOUT 1 SmallInt: Send timeout in seconds
PREF_WEBSERVICES_WFSRECEIVETIMEOUT 2 SmallInt: Receive timeout in seconds
PREF_WEBSERVICES_WMSCONNECTTIMEOUT 3 SmallInt: Connect timeout in seconds
PREF_WEBSERVICES_WMSSENDTIMEOUT 4 SmallInt: Send timeout in seconds
PREF_WEBSERVICES_WMSRECEIVETIMEOUT 5 SmallInt: Receive timeout in seconds
PREF_WEBSERVICES_WMSMAXWIDTH 6 SmallInt: WMS Max Width in pixels
PREF_WEBSERVICES_WMSMAXHEIGHT 7 SmallInt: WMS Max Height in pixels
PREF_WEBSERVICES_ACCESSTYPE 8 Proxy Access type: 0=System, 1=Use Direct, 2=Use Proxy
PREF_WEBSERVICES_PROXYSERVER 9 String: Proxy Server IP
PREF_WEBSERVICES_PORT 10 SmallInt: Proxy Server Port
PREF_WEBSERVICES_BYPASSLOCAL 11 Use bypass 0=Off, 1=On
PREF_WEBSERVICES_BYPASSLIST 12 String: bypass list
PREF_WEBSERVICES_WFSREFRESHUSINGMAP 13 Update mapper filters with current mapper 0=Off, 1=On
PREF_WEBSERVICES_WEBGEOCODECONNECTTIMEOUT 14 SmallInt: Connect timeout in seconds
PREF_WEBSERVICES_WEBGEOCODESENDTIMEOUT 15 SmallInt: Send timeout in seconds
PREF_WEBSERVICES_WEBGEOCODERECEIVETIMEOUT 16 SmallInt: Receive timeout in seconds
PREF_WEBSERVICES_STREETOFFSET 17 Offset value from road
PREF_WEBSERVICES_CORNEROFFSET 18 Offset value from corner
PREF_WEBSERVICES_UNITOFFSET 19 Returns PREF_SYSTEM_DISTANCEUNITS
PREF_WEBSERVICES_GEOCODEDICTIONARY 20 SmallInt: See return values for GeocodeInfo()
PREF_WEBSERVICES_GEOCODEBATCHSIZE 21 SmallInt: Points to batch geocode
PREF_WEBSERVICES_WEBROUTINGCONNECTTIMEOUT 22 SmallInt: Connect timeout in seconds
PREF_WEBSERVICES_WEBROUTINGSENDTIMEOUT 23 SmallInt: Send timeout in seconds
PREF_WEBSERVICES_WEBROUTINGRECEIVETIMEOUT 24 SmallInt: Receive timeout in seconds
PREF_WEBSERVICES_DRIVEREGIONBATCHSIZE 25 SmallInt: Points to batch driving regions
PREF_WEBSERVICES_APPLYMULTIRESULTCODE 26 Mark Multiple matches when automatic mode
PREF_WEBSERVICES_READTIMEOUTWEBTILESERVER 27 Read timeout in seconds for tile servers
PREF_WEBSERVICES_REQUESTTIMEOUTWEBTILESERVER 28 Request timeout in seconds for tile servers
PREF_WEBSERVICES_LIBRARYSERVICEACCESSMODE 29 0=disabled, 1=catalog access, 2=catalog and library access
PREF_WEBSERVICES_OPENMANAGEDTABLESEDITOR 30 Open record viewer/editor after saving managed tables
PREF_WEBSERVICES_BINGKEYFROMUSER 31 String: Returns custom Bing license key if provided by user.
Image Processing Preference Ordinal ID GetPreference Returns
PREF_IMAGEPROCESSING_REPROJECTIONUSEINDEX 0 0=Never, 1=Always, 2=Optimized
PREF_IMAGEPROCESSING_RESAMPLEMETHODINDEX 1 0=Cubic Convolution, 1=Nearest Neighbor
Layout Preference Ordinal ID GetPreference Returns
PREF_LAYOUT_PROMPTSAVEWORKSPACE 3 0=OFF, 1=ON
PDF Preference Ordinal ID GetPreference Returns
PREF_PDF_LAYEREDPDF 0 Layered PDF: 0=OFF, 1=ON
PREF_PDF_SAVEGEOINFO 1 Create Georegistered PDF: 0=OFF, 1=ON
PREF_PDF_SAVEATTRIBUTEDATA 2 Save attribute data 0=OFF, 1=ON
PREF_PDF_AUTOOPENPDF 3 Auto open the PDF 0=OFF, 1=ON
PREF_PDF_POSTSCRIPTSIM 4 Use PDF Advanced option: Enable Postscript Simulation
PREF_PDF_SAVEGEOINFOINNATIVEUNITS 5 Georegistration Coordinate Units: 0=Map Units, 1=Degrees
Performance Preference Ordinal ID GetPreference Returns
PREF_PERFORMANCE_CONCURRENCYSETTING 0 0=None,1=Moderate,2=Intermediate,3=Aggressive,4=Full
PREF_PERFORMANCE_DROPINDEXSETTING 1 SmartIndexing: 0=Auto,1=On,2=Off

Your program must include "MAPBASIC.DEF" if you intend to reference these codes.

Error Conditions

ERR_FCN_ARG_RANGE (644) error is generated if an argument is outside of the valid range.

Example

Include "MAPBASIC.DEF"
Dim i As SmallInt
Dim s As String
i = GetPreference(PREFERENCE_SYSTEM, PREF_SYSTEM_DEFAULTFILEFORMAT)
s = GetPreference(PREFERENCE_SYSTEM, PREF_SYSTEM_DEFAULTCHARSETFORNATIVEX)

See Also:

GetPreferencePath$() function