March 25, 2009

Controlling ArcGIS Map Services with AutoLISP

I’m sitting here at the 2009 ESRI developer summit in Palm Springs. Everyone here is thinking about how to customize ESRI software to do really extraordinary things. I thought it would be a good time to share a little AutoLISP routine that I wrote that manipulates ArcGIS for AutoCAD Map Services to create higher resolution images over a larger area than the current view, as disconnected raster references.

This sample AutoLISP uses ArcGIS for AutoCAD Map Services and creates a mosaic/array of resultant images disconnected as AutoCAD raster references. This sample AutoLISP routine uses a comboination of ArcGIS for AutoCAD commands, ArcGIS for AutoCAD API AutoLISP functions and standard AutoCAD AutoLISP routines.

To use it copy the lisp routine to some location recognized by AutoCAD and load the file. Zoom into the lower left hand corner of an area you want to cover with Raster Reference images. And enter the ESRIMapMosaic command at the command prompt and answer the prompts. The resultant .PNG files will be automatically named after the map service in the same directory as the working drawing file. As with all samples you are encouraged to further customize it to better suit your working environment.

Because ArcGIS for AutoCAD uses the current AutoCAD display view extents to determine the view scale for maps generated by ArcGIS server, to get a higher resolution over a larger area you can use this AutoLISP routine to bring the images local to your desktop. Although they are converted to static .PNG Images, you might find value for the higher resolution images as a backdrop. The effect is laying down a mosaic of an area built from tightly zoomed tiles of a higher resolution than is displayed when you rely on a single Map Service image to cover the same area.

Here is the file on ArcScripts: MapMosiac.lsp.


Anonymous cad services said...

Nice and informative.

12:37 AM  

Post a Comment

<< Home

FREE hit counter and Internet traffic statistics from