faysalmirmd

Arcmap Selection Command execution In C#

May 19th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. /** ArcMap commands List: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000029s000000**/
  2.         public static void SelectbyRectangleCommandExec()
  3.         {
  4.             UID id = new UIDClass();
  5.             id.Value = "{78FFF793-98B4-11D1-873B-0000F8751720}";
  6.  
  7.             ArcMap.Application.FindExtensionByCLSID(id);
  8.  
  9.             var command = ArcMap.Application.Document.CommandBars.Find(id, false, false);
  10.             if (command != null)
  11.                 command.Execute();
  12.         }
  13.  
  14.         public static void ClrSelectbyRectangleCommandExec()
  15.         {
  16.             UID id = new UIDClass();
  17.             id.Value = "{37C833F3-DBFD-11D1-AA7E-00C04FA37860}";
  18.             ArcMap.Application.FindExtensionByCLSID(id);
  19.             var command = ArcMap.Application.Document.CommandBars.Find(id, false, false);
  20.             if (command != null)
  21.                 command.Execute();
  22.  
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment