laptop and a wrench

Bug

The sample provided in the ESRI Help documentation for IMap.ClipGeometry does not generate any output in ArcGIS 10.

Last Published: August 31, 2014 ArcGIS Engine
Bug ID Number NIM066487
SubmittedMarch 24, 2011
Last ModifiedJune 5, 2024
Applies toArcGIS Engine
Version found10.0
Program languageVBA
Operating SystemWindows OS
Operating System VersionXP
StatusWill Not Be Addressed

Additional Information

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Workaround

IMap.ClipGeometry preceded by IMapClipOptions::esriMapClipType.esriMapClipMapExtent at ArcGIS 10Sample code:Dim mxDoc As IMxDocument = m_application.Document Dim pMap As IMap = mxDoc.FocusMap Dim cliplayer As IFeatureLayer = pMap.Layer(0) 'get the features in the clipLayer to construct a geometry to be assigned to the IMap.ClipGeometry Dim pFeatCursor As IFeatureCursor = cliplayer.Search(Nothing, False) Dim feature As IFeature = pFeatCursor.NextFeature 'loop through the features to construct a geometry to be assigned ti the IMap:ClipGeometry Dim counter As Integer = 0 Dim topoOperator As ITopologicalOperator Dim unionGeometry As IGeometry = Nothing While (feature) IsNot Nothing Dim geometry As ESRI.ArcGIS.Geometry.IGeometry = feature.Shape If (counter = 0) Then topoOperator = feature.ShapeCopy counter = counter + 1 Else unionGeometry = topoOperator.Union(feature.ShapeCopy) topoOperator = CType(unionGeometry, ITopologicalOperator) End If

Steps to Reproduce

Bug ID: NIM066487

Software:

  • ArcGIS Engine

Get notified when the status of a bug changes

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