Active Contributor
Posts: 26
Registered: ‎05-07-2009
Message 1 of 3 (334 Views)

How to work with Default Paletteset in AutoCAD 2009?

334 Views, 2 Replies
03-09-2010 11:04 PM

I'm a new bie to AutoCAD and trying to work with existing (Default) Palette Set provided in AutoCAD 2009.

I'm working on an application which would display a particular Palette on demand (user may issue a command) and then it would be vanished on demand (user may issue another command for that). And I want to do that with the present Tool Palette set.

I'm assuming the Default Palette Set of AutoCAD is the Tool Palette Window, the one which is launched by ToolPalettes command or pressing Ctrl+3 or by going through menu "Tools--> Palettes--->Tool Palettes.

Here is a sample code which I tried to get the object of Default PaletteSet :

System.Guid gd = new Guid(("{6442ECC1-5F16-49C3-B89E-3999B89C34B7}"));
Autodesk.AutoCAD.Windows.PaletteSet ps = new Autodesk.AutoCAD.Windows.PaletteSet("Tool Palettes Window",gd);

The GUID value and Paletteset name comes from this file:
C:\Documents and Settings\cov.builds\Application Data\Autodesk\AutoCAD 2009\R17.2\enu\Support\ToolPalette\AcTpCatalog.atc

But ps.Count is showing 0, and I can't access any palette there.

Any help suggestion would be greatly appreciated.

Thanks a lot

Best regards

Farrukh Edited by: farrukhw on Mar 10, 2010 12:17 PM
Posts: 18
Registered: ‎09-25-2007
Message 2 of 3 (334 Views)

Re: How to work with Default Paletteset in AutoCAD 2009?

03-10-2010 01:44 PM in reply to: farrukhw
Sorry, you can't do that.

What you're doing is to add a .NET new palette.
The count is 0 because you did Add any forms (control) to your ps palette.

I'm not sure exactly though how you can customize AutoCAD tool palette.

Bert Edited by: bertyboy on Mar 10, 2010 1:44 PM
Posts: 21
Registered: ‎04-08-2011
Message 3 of 3 (44 Views)

Re: How to work with Default Paletteset in AutoCAD 2009?

07-11-2014 11:04 AM in reply to: farrukhw

Well, the question is pretty ancient but I'll try to answer )

To work with standart Tool Palettes you need to add reference to AcTcMgd.dll to your project and then to use class Autodesk.AutoCAD.Windows.ToolPalette.ToolPaletteManager. It has static member Manager. To get specific palettes use property Catalogs. Catalog contains Tools.

What I would like to know is how to get tools in order they appear on palette. By default they are returned in order they're saved in palette file, meanwhile elements' order override is saved in current profile file... Can anybody tell me the right way to get this override?


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.