Select to view content in your preferred language

Load MXD performance

983
3
12-15-2010 01:50 AM
HarshaPerera
Occasional Contributor
Hello,

We have developed an ArcEngine 9.3.1 application. It typically loads a map document by calling LoadMxFile and then zooms to a location on the map. The mxd file can have multiple mastermap layers and rasters. The document is saved zoomed at the relevant area of interest ??? in this case the whole of the UK.
The LoadMxFile call can take a long time to complete resulting in poor performance. Can you suggest a way of improving application performance, especially in situations where we know that we intend to zoom in on a different location? Is it possible to call the loadMx method asynchronously and then cancel the drawing of the layers and zoom to a location? We want to be able to do this programmatically.

Thanks,
Harsha
0 Kudos
3 Replies
DuncanHornby
MVP Notable Contributor
Harsha,

What format is your underlying data stored as? If you've got MM then that should be stuck in a File Geodatabase and compressed. If any of your data is Shapefile make sure you have built spatial indices for them. If your data is multi-part explode it into single part and make sure you have a scale threshold set for layers. If you are opening the MXD at the level of the UK you only want to be displaying the coastline and probably key cities, motorways then the other datasets become visible at their appropriate scale.

Duncan
0 Kudos
AlexanderGray
Honored Contributor
There is a ReadMxMaps method that allows you to load up the mxd in memory but not into the mapcontrol.  You might want to do that, set the extent of the map or pause the drawing and then load the map to the control by setting the mapcontrol's map property.  It also give you a chance to pick the appropriate map if there are multiple dataframes in your mxd.
0 Kudos
Venkata_RaoTammineni
Regular Contributor
Hello,

We have developed an ArcEngine 9.3.1 application. It typically loads a map document by calling LoadMxFile and then zooms to a location on the map. The mxd file can have multiple mastermap layers and rasters. The document is saved zoomed at the relevant area of interest �?? in this case the whole of the UK.
The LoadMxFile call can take a long time to complete resulting in poor performance. Can you suggest a way of improving application performance, especially in situations where we know that we intend to zoom in on a different location? Is it possible to call the loadMx method asynchronously and then cancel the drawing of the layers and zoom to a location? We want to be able to do this programmatically.

Thanks,
Harsha


You can scaling data ...you can increase your map performance...!
0 Kudos