laptop and a wrench

Bug

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

Zuletzt veröffentlicht: August 25, 2014 ArcGIS for Desktop
Bug-ID-Nummer NIM043981
EingereichtApril 6, 2009
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS for Desktop
Gefunden in Version9.3
ProgrammspracheVB.Net
BetriebssystemWindows OS
BetriebssystemversionXP
Behoben in Version10.1
StatusFixed

Workaround

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)

Schritte zur Reproduzierung

Bug-ID: NIM043981

Software:

  • ArcGIS for Desktop

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln