2

I am looking for the identifiers for the method ICommandBars.Find(object identifier) method in the ArcObjects. During web search I found the following page, that used the class ArcID, but I cannot find it anywhere.

I need to get the CommandItemfor the Start Editing command.

1

Please have a look at this page. You can use or execute it as follows:

        object helpme = "{59D2AFD0-9EA2-11D1-9165-0080C718DF97}";
        ESRI.ArcGIS.esriSystem.UID uid = new ESRI.ArcGIS.esriSystem.UIDClass();
        uid.Value = helpme;
        //For accessing some sub menues you can use the SubType attribute
        //uid.SubType = 9;

        //Search the commandbars
        ESRI.ArcGIS.Framework.ICommandBars commandBars = ArcMap.Application.Document.CommandBars;

        //Find the command
        ESRI.ArcGIS.Framework.ICommandItem commandItem = commandBars.Find(uid, false, false);

        //Execute the command
        if (commandItem != null)
        {
            commandItem.Execute();
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.