Select to view content in your preferred language

Load only one state from a MXD file in arcobjects

2006
2
09-13-2010 02:13 PM
PatrickBurke
Emerging Contributor
Right now I load "StreetMap North America.mxd" from ESRI Data Maps 10 for use with arcobjects / arcengine 10 in Visual Studio with C#. Since it's slow I am looking for a way to turn off all data except for data from Minnesota and Wisconsin. What are the main steps to accomplish this?
0 Kudos
2 Replies
MiriRevivo
Deactivated User
Hi Patrick,

The first thing you will need to do is turn off (set the ILayer.Visible = false) all the irrelevant layers in the mentioned mxd (if there are any).
Next, you need to apply a query defintion on the states layer, to make it display only the 2 mentioned states and hide the rest. That can be accomplished using the IFeatureLayerDefinition interface.
0 Kudos
NeilClemmons
Honored Contributor
Since you mentioned this is an ArcGIS Engine application I would just make a copy of the mxd, open it in ArcMap, set the visibility and everything else like you want it, save it, and open this copy in the application.
0 Kudos