zoukankan      html  css  js  c++  java
  • ArcGIS Pro二次开发-执行已有的命令

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using ArcGIS.Core.CIM;
    using ArcGIS.Core.Data;
    using ArcGIS.Core.Geometry;
    using ArcGIS.Desktop.Catalog;
    using ArcGIS.Desktop.Core;
    using ArcGIS.Desktop.Editing;
    using ArcGIS.Desktop.Extensions;
    using ArcGIS.Desktop.Framework;
    using ArcGIS.Desktop.Framework.Contracts;
    using ArcGIS.Desktop.Framework.Dialogs;
    using ArcGIS.Desktop.Framework.Threading.Tasks;
    using ArcGIS.Desktop.Mapping;
    
    
    
    using System.Windows;
    
    
    
    using System.Windows.Input;
    
    
    using System.Windows.Media;
    
    using System.Windows.Media.Imaging;
    
    
    using ArcGIS.Desktop.Core.Events;
    
    using ArcGIS.Core.Events;
    
    using ArcGIS.Desktop.Mapping.Events;
    
    
    
    
    
    namespace ylsetpro
    {
        internal class btnAddData : Button
        {
            protected override void OnClick()
            {
    
                // FrameworkApplication.Close();
    
                IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper("esri_editing_ShowAttributes");
    
                var command = wrapper as ICommand; // tool and command(Button) supports this
    
    
    
                if ((command != null) && command.CanExecute(null))
    
                    command.Execute(null);
            }
        }
    }

    the caption when you reference the tools here:

     
    1.         <group id="MyFavoriteGroupOfTools" caption="My Favorite Tools" appearsOnAddInTab="false">  
    2.           <button refID="esri_editing_ShowAttributes" size="small"/>  
    3.           <button refID="esri_mapping_clearSelectionButton" size="small"/>  
    4.         </group>  

    所有的ID https://github.com/Esri/arcgis-pro-sdk/wiki/DAML-ID-Reference-ADCore.daml

    https://github.com/Esri/arcgis-pro-sdk/wiki/DAML-ID-Reference-ADCore.daml

    esri_core_editDeleteButton   删除

    esri_core_exitApplicationButton 退出

    esri_core_previewZoomFullButton 全图

    esri_core_previewZoomToSelectionButton 缩放到选择

    esri_core_refresh   刷新

    esri_core_saveProjectButton 保存

    esri_core_showProjectDockPane 显示catalog面版

    esri_folderConnectionAddButton  添加连接

    esri_folderConnectionRemoveButton 移除连接

    esri_mapping_addDataButton  添加数据

    esri_mapping_clearLayerSelectionButton 清除选择

    esri_mapping_fixedZoomInButton 固定放大

    esri_mapping_fixedZoomOutButton 固定缩小

    esri_mapping_gotoXYControl      gotoxy

    esri_mapping_zoomToLayerSelectionButton 缩放到选择

    esri_mapping_zoomToSelectedLayersButton 缩放到图层

    esri_projectItemAddToNewMapButton   一个新地图窗口

    esri_layouts_projectContainer_NewLayout 一个新的布局

  • 相关阅读:
    查看客户端的IP地址,机器名,MAC地址,登陆名等信息
    查看sqlserver 2008中性能低下的语句
    搜索包含指定关键字的存储过程
    获得客户端详细信息以及每个进程的sql语句
    实战:sqlserver 日常检查脚本
    NIO的学习总结
    JavaWEB过滤器和监听器技术
    抽象工厂模式代码:
    详解 equals() 方法和 hashCode() 方法
    net.sf.json JSONObject与JSONArray使用实例
  • 原文地址:https://www.cnblogs.com/gisoracle/p/12469935.html
Copyright © 2011-2022 走看看