Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
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) –  Simon Sep 13 '10 at 23:07
add comment

1 Answer

up vote 8 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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