laptop and a wrench

Bogue

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

Dernière publication: August 25, 2014 ArcGIS for Desktop
Numéro d’ID de bogue NIM043981
EnvoiApril 6, 2009
Dernière modificationJune 5, 2024
S’applique àArcGIS for Desktop
Version trouvée9.3
Langue du programmeVB.Net
Système d’exploitationWindows OS
Version du système d’exploitationXP
Version de correction10.1
StatutFixed

Solution de contournement

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)

Étapes pour reproduire

ID de bogue: NIM043981

Logiciel:

  • ArcGIS for Desktop

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement