I am trying to add a Ribbon Panel with commands from a .Net AutoCAD extension and I cannot find the commands in the command list area of the Customize User Interface Dialog.
I have loaded the extension using the netload command and the custom commands appear at the command line.
Where do I need to look to find these commands?
Thanks
Unless the DLL adds the command references to the CUIx, you need to add them yourself. As the phrase suggests the CUIx contains command references which define which AutoCAD command to call when the tool is clicked. It doesn't define or contain the commands themselves.
Hi,
As "dgorsman" mentioned, you will need the CUI API to do this.
Here is a code snippet :
// AcCui.dll using Autodesk.AutoCAD.Customization; [CommandMethod("MYTESTCOMMAND")] public void MyTestCommandMethod() { Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; ed.WriteMessage("MyTestCommand"); } [CommandMethod("CreateCommand")] public void CreateCommandMethod() { Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; String mainCuiFile = String.Format("{0}.cuix", Application.GetSystemVariable("MENUNAME")); CustomizationSection cs = new CustomizationSection(mainCuiFile); MacroGroup macGroup = cs.MenuGroup.MacroGroups[0]; MenuMacro menuMac; menuMac = macGroup.CreateMenuMacro("MYTESTCOMMAND", "^C^C_MYTESTCOMMAND ", "MYTESTCOMMAND", "My custom command", MacroType.Any, "RCDATA_16_LINE", "RCDATA_32_LINE", "ID_MYTESTCOMMAND"); menuMac.ElementID = "ID_MYTESTCOMMAND"; menuMac.macro.CLICommand = "MYTESTCOMMAND"; cs.Save(); }
I had one of those "Duh" moments. after reading your reply. I can't find the commands for my extension because I have to create them. I appreciate all of the replies.
Thanks, all
Toren