Reordering ToolPalette Tabs With a Text Editor
Changing the order of the ToolPalette tabs is more hassle than it needs to be. This is because the tab order is set by when they were created; you can drag them around and reorder them but they will just reset themselves.
There are two ways to go about reordering the tabs. One way is to recreate the palette with the tabs in the desired order. It works, but there is another way to reorder tabs and that's what I'll cover here.
The following example covers reordering two tabs in a custom palette.
Let's say I want to swap "New Features" and "New Services". The following are the steps:
Note: AcTpCatalog.atc file is written in XML, which is case sensitive. For example, if you try to close a "<Palette>" tag with "</palette>", AutoCAD will give you an error and your tool palette won't work anymore. If you end up with a broken tool palette, it's worth checking your .atc file for syntax errors. http://www.w3schools.com/xml/xml_validator.asp is a good site to use to check for syntax errors.
There are two ways to go about reordering the tabs. One way is to recreate the palette with the tabs in the desired order. It works, but there is another way to reorder tabs and that's what I'll cover here.
The following example covers reordering two tabs in a custom palette.
- Go to the location of the tool palette files.
- Find the file AcTpCatalog.atc, turn off "read-only" attribute, and open it with a text editor (Notepad++ used for this example)
- Note that the whole file is on one line. This is how Autocad re-generates the file every time.
- Next step is to make this thing readable by adding a new line after every closing angled bracket ">". This is easily done in Notepad++, by replacing ">" with ">\n".
- Optional: For even better readability insert a newline before every instance of "<Palette" and a newline after every "</Palette>"
- It should now be fairly straight forward to reorder the tabs by cutting and pasting the palette.
- Each palette is contained in between the opening tag "<Palette>" and closing tag "</Palette>".
- Save and close the file.
- Put "read-only" back on the file.
Note: AcTpCatalog.atc file is written in XML, which is case sensitive. For example, if you try to close a "<Palette>" tag with "</palette>", AutoCAD will give you an error and your tool palette won't work anymore. If you end up with a broken tool palette, it's worth checking your .atc file for syntax errors. http://www.w3schools.com/xml/xml_validator.asp is a good site to use to check for syntax errors.
Comments
Post a Comment