PROBLEM

Polygon features do not appear when printing or exporting a rotated data frame

Last Published: April 25, 2020

Description

Note:
The content in this article pertains to ArcGIS versions 8.x only. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.

When printing or exporting a map in ArcMap with a rotated data frame, some polygon features may not appear on the output.

Cause

This is a known issue with geometrically complex features.

Solution or Workaround

As a work-around, use the steps below to simplify complex features. Make backup copies of all data before running any code samples.

  1. Start ArcMap and load the MXD.
  2. Select Start Editing from the Editor toolbar. Specify a workspace if prompted.
  3. Use the Select Features tool to select all features in the polygon layer.
  4. Open the Visual Basic Editor.
     
    In ArcMap, select Tools > Macros > Visual Basic Editor.
  5. In the Project Explorer window, expand Project.mxt and select ArcMap Objects > ThisDocument, right-click and select View Code.
[O-Image] Visual Basic Project  Explorer
 
Note:
Code in the Project's ThisDocument code module will only run in the current map document. If you want to store the code in all your map documents, open the Normal.mxt ThisDocument code module instead.
  1. Copy the following code into the code module.
Code:
Option Explicit

'********************************************************************
'This sub simplifies all of the selected features in a
'given feature class. An editing session must be started before use.
'********************************************************************

Public Sub SimplifyFeature()
   Dim pID As New UID, pEditor As IEditor
   Dim pApp As IApplication, pTopoOp2 As ITopologicalOperator2
   Dim pEnumFeat As IEnumFeature, pFeature As IFeature
   Dim pGeometry As IGeometry
   pID = "esriCore.editor"
   Set pApp = Application
   Set pEditor = pApp.FindExtensionByCLSID(pID)
   If Not pEditor.SelectionCount > 0 Then
     MsgBox "Select one polygon"
     Exit Sub
   End If
   If pEditor.EditState = esriStateNotEditing Then
      MsgBox "Please start editing"
      Exit Sub
   End If
   pEditor.StartOperation
   Set pEnumFeat = pEditor.EditSelection
   Set pFeature = pEnumFeat.Next
   While Not pFeature Is Nothing
    If pFeature.Shape.GeometryType = esriGeometryPolygon Then
       Set pTopoOp2 = pFeature.ShapeCopy
       pTopoOp2.IsKnownSimple = False 'SET KNOWSIMPLE to False
       pTopoOp2.Simplify 'SIMPLIFY
       Set pFeature.Shape = pTopoOp2
       pFeature.Store
    End If
    Set pFeature = pEnumFeat.Next
   Wend
   pEditor.StopOperation "Simplify Features"
 End Sub
  1. Close the Visual Basic Editor.
  2. Run the code.
    1. Click Tools > Macros > Macros to display the Macros dialog box.
    2. Select a macro and click Run.
All polygons will now appear on the output.

Article ID: 000004454

Software:
  • ArcMap 8 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options