EDN Code Exchange

Updated Sep 29, 2010
Samples

Detect Complex Output Sample

Description:

This Developer Sample provides a toolbar with two commands that can help identify map contents that may contribute to printing or export problems. The two commands, Detect Raster and Count Masks, run inside of the ArcMap application and can be used on any map document.

The Detect Raster command creates a report listing the raster layers found in each dataframe of the map. The report also includes a list of layers using symbology that may force a layer to rasterize on output, a common cause of large export file sizes and unexpected printing problems.

The Count Masks command creates a report with counts for each layer being used for ArcMap's variable-depth masking functionality. Variable depth masking can lead to output problems when a map with many masks is exported to a vector-based graphics format or when the map is printed. The report from the Count Masks command can be used to identify masking layers that may be using overly-complex mask types or layers that contain an excessive number of mask polygons.

Products:

ArcView: VB

Platforms: Windows

Minimum ArcGIS Release: 9.0

How to use:
  1. Double click on the _InstallDetectComplexOutputSample.bat file include with the code. This batch file will register the esriDtctCplxOutput DLL and put all the included classes in the correct categories. The classes include one toolbar and two commands. The install and uninstall batch files assume the regsvr32 command is accessible from the system path.
  2. Enable the Detect Complex Output toolbar from the View menu's Toolbars list.
  3. Click on the Detect Raster or Count Masks button to generate a report based on the contents of the currently open map.

VB6
File Description
esriDtctCplxOutput.vbp The Detect Complex Output Visual Basic project file.
CplxOutputToolbar.cls The Visual Basic class containing the Detect Complex Output Toolbar implementation.
CountMasks.cls The Visual Basic class containing the Count Masks command implementation.
DetectRaster.cls The Visual Basic class containing the Detect Raster command implementation.
Progress.frm The Visual Basic form containing the progress dialog.
ReportDisplay.frm The Visual Basic form containing the report display dialog.



Key CoClasses:Map, PageLayout, FeatureLayer
Key Interfaces: ILayerMasking
Key Members:ILayerMasking::UseMasking, ILayerMasking::MaskingLayers