124 | Chapter 8 DWF API Additions
MGMap Object
MGMap is the top-level object of the API for the Autodesk MapGuide Viewer
ActiveX Control, Plug-In, and Java Edition. For the ActiveX Control, MGMap
is a COM interface.
This object has one new method that you can use to save the current view of
the MWF file in the Autodesk MapGuide Viewer to a DWF file.
For more information about the MGMap object, see the Autodesk MapGuide
Viewer API Help. You can access the Autodesk MapGuide Viewer API Help by
clicking Autodesk MapGuide 6.5 ➤ Documentation ➤ Autodesk MapGuide
Viewer API Help on the Program menu.
saveAsDwf Method
Syntax
boolean saveAsDWF(String pathFileName)
Description
Saves the current view of the map to a DWF file.
Note This method supports both local and UNC absolute paths. It does not sup-
port relative paths or the creation of multiple nested folders. In addition, you can-
not save DWF files to a read-only folder, but you can create a new folder within
a read-only folder, and save the DWF file to that new folder.
For more information about saving maps as DWF files, see “Saving a View As
a DWF File” on page 32.
Parameters
pathFileName – String representing the absolute path and file name for the
saved DWF.
Returns
boolean – Specifies whether or not the map has been successfully saved as a
DWF file.
True – Indicates it has been successfully saved.
False – Indicates it has not been saved.