.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to work with Default Paletteset in AutoCAD 2009?

2 REPLIES 2
Reply
Message 1 of 3
farrukhw
504 Views, 2 Replies

How to work with Default Paletteset in AutoCAD 2009?

Hi

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
2 REPLIES 2
Message 2 of 3
bertyboy
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.

Regards,
Bert Edited by: bertyboy on Mar 10, 2010 1:44 PM
Message 3 of 3
jimjam
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?

Thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost