Setting the picture symbol vectorization settings for vector exports
To access the picture symbol vectorization settings, use the IExportVectorOptionsEx interface. IExportVectorOptionsEx can be cast onto an IExport object to set the ExportPictureSymbolOptions property. The following table shows the possible values:
Constant
|
Value
|
Description
|
esriPSORasterize
|
0
|
Rasterizes layers with picture symbols (the default).
|
esriPSORasterizeIfRasterData
|
1
|
Rasterizes layers with picture symbols only if the symbols have raster data.
|
esriPSOVectorize
|
2
|
Vectorizes layers with picture symbols.
|
Follow these steps to set the picture symbol vectorization settings:
-
Initialize an IExport object called docExport for the desired type of export.
-
Use the following lines of code to initialize the IExport object's vectorization settings:
if (docExport is IExportVector)
{
// Assign the IExportVectorOptionsEx property to control the rendering of picture marker symbols.
docExportVectorOptionsEx = docExport as IExportVectorOptionsEx;
docExportVectorOptionsEx.ExportPictureSymbolOptions =
esriPictureSymbolOptions.esriPSOVectorize;
}
[VB.NET]
If TypeOf docExport Is IExportVector Then
' Assign the IExportVectorOptionsEx property to control the rendering of picture marker symbols.
docExportVectorOptionsEx = docExport
docExportVectorOptionsEx.ExportPictureSymbolOptions = esriPictureSymbolOptions.esriPSOVectorize
End If
This code is only valid for vector export types, such as Enhanced Metafile (EMF), Encapsulated PostScript (EPS), Portable Document Format (PDF), and Adobe Illustrator (AI). Attempting to cast IExportVectorOptionsEx to a non-vector IExport object will result in an invalid cast error.
To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing | Deployment licensing |
---|---|
ArcGIS for Desktop Basic | ArcGIS for Desktop Basic |
ArcGIS for Desktop Standard | ArcGIS for Desktop Standard |
ArcGIS for Desktop Advanced | ArcGIS for Desktop Advanced |
Engine Developer Kit | Engine |