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?

  • Do u mean, open the MXD, but before it starts drawing/rendering, you want to loop through the TOC and turn all layers off? (except the ones u mention)
    – jakc
    Sep 13, 2010 at 23:07

1 Answer 1


For each layer that has a State field, I'd check to see if it has an index, and if not then add an index using ArcCatalog (or IFeatureClass.AddIndex if you don't). After that I would apply a feature layer query definition to each of those layers that filters out only the two states with ArcMap (or with IFeatureLayerDefinition.DefinitionExpression if you don't have arcmap). After doing this, only features satisfying the definition expression will draw.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.