Public Overrides Sub OnClick() Try 'TODO: Add ClipTool.OnClick implementation Dim pMap As IMxDocument = GetMxDocumentFromArcMap(m_application) Dim pFeatLayer As IFeatureLayer = pMap.SelectedLayer Dim pFeatSelection As IFeatureSelection = pFeatLayer Dim pSelSet As ISelectionSet pSelSet = pFeatSelection.SelectionSet If pSelSet.Count = 0 Then MsgBox("Please make a selection") Dim pCommand As ICommand pCommand = New ControlsSelectFeaturesToolClass ' The selectfeatures tool pCommand.OnCreate(m_application) If pCommand.Enabled = True Then m_application.CurrentTool = pCommand End If Exit Sub End If Call CreateWindow(GetMxDocumentFromArcMap(m_application)) Catch ex As Exception MsgBox(ex.Message) End Try End Sub
Private Sub btnRunByPolyGraphic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRunByPolyGraphic.Click Dim pUID As New UID pUID.Value = "esriArcMapUI.SelectFeaturesTool" m_pApp.CurrentTool = m_pApp.Document.CommandBars.Find(pUID) 'do something End Sub
If pCommand.Enabled = True Then m_application.CurrentTool = pCommand End If Exit Sub
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.