laptop and a wrench

Error

ISxDocument.UpdateContents does not update the contentsview correctly after switching the ContextItem in .NET.

Última publicación: August 25, 2014 ArcGIS for Desktop
Número de ID del error NIM043981
EnviadoApril 6, 2009
Última modificaciónJune 5, 2024
Relacionado conArcGIS for Desktop
Versión encontrada9.3
Lenguaje del programaVB.Net
Sistema operativoWindows OS
Versión de sistema operativoXP
Versión corregida10.1
EstadoFixed

Solución alternativa

Create VBA macro with working code in the SXD, something like this: Dim pSxDoc As ISxDocument Dim pSxTOC As ISxContentsView Set pSxDoc = Application.Document Set pSxTOC = pSxDoc.CurrentContentsView pSxTOC.Activate Application.hWnd, pSxDoc pSxTOC.ContextItem = pSxDoc.Scene.Layer(1) pSxDoc.UpdateContents pSxTOC.Refresh NothingThen use IVbaApplication.RunVBAMAcro in the VB.NET code to run that code: Dim pVbaApp As ESRI.ArcGIS.Framework.IVbaApplication Dim s As String pVbaApp = m_app pVbaApp.RunVBAMacro("Project", "ThisDocument", "TestTOC", Nothing)

Pasos para reproducir

ID del error: NIM043981

Software:

  • ArcGIS for Desktop

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga