0 Members and 1 Guest are viewing this topic.
// get apointer to the editor Editor ed = acadApp.DocumentManager.MdiActiveDocument.Editor; // Get apointer to the tool palettes manager... ToolPaletteManager tpMan = ToolPaletteManager.Manager; // Get the tool pcatalog paths ed.WriteMessage("\nCatalog path: {0}\n\n", tpMan.CatalogPath); // get the cdollection of tool catalogs loaded CatalogItemCollection catalogItems = tpMan.Catalogs; tpMan.LoadCatalogs(); foreach(CatalogItem catalogItem in catalogItems) { ed.WriteMessage("\n\nCatalog item type: {0}", CatalogItem.GetType(catalogItem.LocalFile).ToString()); if (!catalogItem.HasChildren) continue; for (int i = 0; i < catalogItem.ChildCount; i++) { CatalogItem paletteItem = catalogItem.GetChild(i); ed.WriteMessage("\nChild item type: {0}", CatalogItem.GetType(paletteItem.LocalFile).ToString()); if (CatalogItem.GetType(paletteItem.Url.ToString()) == CatalogItemType.ItemPalette) { ed.WriteMessage("\nGot a palette!"); ed.WriteMessage("\nPalette name: {0}", paletteItem.Name); } } }
The CAdUiPaletteSet class contains a set of one or more palette windows (CAdUiPalette objects), and supports the following palette style constants:
LE,If you're referring to the BoltUI etc. sample that ships with the ObjectARX SDK, again this is creating a CUSTOM toolpalette.I just want to programmatically manipulate the existing palettes (load/unload etc).Cheers,Glenn.
namespace Autodesk.AutoCAD.Windows.ToolPalette{ //// stripped by kwb 'cause 'The message exceeds the maximum allowed length (20000 characters). '}