Follow us on Twitter

SaveMap Macro


Maptitude 2019 introduced the concept of compressed workspaces. These are stored in “wrkz” files which replace the familiar “map” files. A workspace can contain multiple map (windows). This is a positive way forward because it makes it easier for users to transfer maps with one file – in a similar way as MapPoint users shared “ptm” files. However, during a transition period, some users may find they need a map for an older utility or macro. The following script solves this problem by letting the user select a map window, and then save it to a map file.

Note: This script uses the SaveMap() api call. It is likely that Caliper will withdraw support for this API call in the near future – quite possibly with a later build of Maptitude 2019.

The source code can be downloaded here. This is a compressed RSC file and is distributed under the Modified BSD license. You will need to un-compress it before compiling the RSC file. Enable the GISDK Toolbox in Maptitude by selecting GIS Developer’s Kit on the Tools menu. Compile the RSC file by pressing the Compile button (page with green arrow) on the toolbox. You may then test the macro by pressing the Test button (page with magnifying glass). For regular use, the macro can be compiled into a GUI database, although you will probably wish to add a menu item or button.

The source code is based on the previous Simple GISDK Demo example. Here it is:

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">