If TypeOf My.ArcMap.Document.ActiveView Is IMap Then ' document is in Data view ElseIf TypeOf My.ArcMap.Document.ActiveView Is IPageLayout Then ' document is in Layout view End If
Public ReadOnly Property Enabled() As Boolean Implements ESRI.ArcGIS.SystemUI.ICommand.Enabled Get Dim mxDocument As IMxDocument = DirectCast(m_application.Document, IMxDocument) ' Enabled as long as the document is in Data view. Return (TypeOf mxDocument.ActiveView Is IMap) End Get End Property
Dim pMap As IMap = My.ArcMap.Document.ActiveView
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.