laptop and a wrench

Bug

When the 'Open MXD' button is used in the EngineControls sample(to switch from MXD with a custom layer to a blank MXD), the custom layer is not being unloaded properly.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM012188
SubmittedOctober 5, 2007
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Program languageVC++
Version Fixed9.3
StatusFixed

Workaround

Need to clear the ActiveView when the OnPageLayoutReplaced event is calledHere are the code changes for a workaround. In the file EngineControlsDlg.cpp - HRESULT CEngineControlsDlg::OnPageLayoutReplaced(VARIANT newMap){ if(m_ipPageLayout) { m_ipPageLayout ->Clear(); } m_ipPageLayoutControl->get_ActiveView(&m_ipPageLayout); // Get the IActiveView of the focus map in the PageLayoutControl IActiveViewPtr ipActiveView; m_ipPageLayoutControl->get_ActiveView(&ipActiveView); In the file EngineControlsDlg.h – // The Controls IToolbarControlPtr m_ipToolbarControl; IToolbarControlPtr m_ipMapToolbarCtrl; ITOCControlPtr m_ipTOCControl; IMapControl3Ptr m_ipMapControl; IPageLayoutControl2Ptr m_ipPageLayoutControl; IActiveViewPtr m_ipPageLayout;

Steps to Reproduce

Bug ID: NIM012188

Software:

  • No Product Found

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