Publisher


Supported with:
Library dependencies: System, SystemUI, Geometry, Display, Server, Output, Geodatabase, GISClient, ArcWeb, DataSourcesFile, DataSourcesGDB, DataSourcesOleDB, DataSourcesRaster, DataSourcesNetCDF, GeoDatabaseDistributed, GeoDatabaseExtensions, Carto, NetworkAnalysis, Location, GeoAnalyst, Animation, Maplex, Geoprocessing, NetworkAnalyst, Schematic, SpatialAnalyst, 3DAnalyst, GlobeCore

Additional library information: Contents, Object Model Diagram

The Publisher library implements the non-user interface (UI) functionality of the ArcGIS Publisher extension. The library can be used for the creation and packaging of Published Map Files (PMFs) and the creation of customized ArcReader applications. The PublisherEngine and PackagerEngine objects support the publishing of PMF files and the subsequent packaging of the published maps files.
 
Developers do not extend this library.

The objects that implement this functionality are grouped into a number of library subsystems. These library subsystems are:

Publisher

There are two classes that you can use to create and package PMFs. PublisherEngine is used to create published maps, while PackagerEngine is used to create file directories that contain the published map and all the data needed to use the map. The basic setup for using the PublisherEngine and PackagerEngine classes is as follows:
 

Obtaining a publisher license

To access the Publisher objects you must obtain a Publisher license. You can call for a license prior to accessing each Publisher object, call it once in a single subroutine, or call it once globally in the Main routine in a program. Since you only need to call the single subroutine once, or the license is automatically enabled if you call it globally, either of these two approaches are the preferred methods for obtaining a license.
 
For more details on how to check out the ArcGIS Publisher license, see the AoInitialize component help.
 

Publisher engine settings

There are a number of settings that can be used when creating a published map. These settings control how the published map is used as shown in the following code.

Publisher settings are placed in a property set until ready for use. Initialize the property set with the default publisher settings. Initializing the property set with defaults ensures that there will be no problems with Publisher settings that may or may not be saved in the map document. This is shown in the following code.

Then set the desired Publisher settings.
 

Creating a published map

To publish a map, you need to provide PageLayout, DefaultView, Settings, RelativePaths, and output Document as shown in the following code.

A PageLayout is part of a map document.
 
The DefaultView refers to the view that the published map will open in ArcReader.
 
Settings are provided in the property set as described above.
 
RelativePaths is a boolean that controls how data source locations are stored in the published map for each layer. This setting has no effect on map documents that use Universal Naming Convention (UNC) (\\computer_name) paths or server connections, such as ArcSDE and ArcIMS.
 
The output Document is the name you give to the published map.
 

Packager settings

Use packager settings to control how the data is packaged. There are options for data format, feature intersecting, raster clipping, and copying. The following code shows the packager settings.

Initialize default packager settings as shown in the following code.

Creating the data package

Data packages are created from published maps. When using the package method, you need to provide the package settings and the published map or maps to package. Since you can package more than one published map at a time, a string array of published maps is used as shown in the following code.