Creating Catalogs, Tool Palettes and Tools

When your application is first loaded into AutoCAD, you must create the ATC files that define your tool palette configuration. Both basic options for writing the XML content are labor-intensive and tedious. On one hand, you could write the ATC files manually, using a text editor or XML editor. On the other hand, to be sure of satisfying the ATC schema, you could use AcTc classes that guarantee that your data is saved in the proper file format. This approach requires a combination of Tool Palette APIs and industry-standard XML APIs to walk the XML tree, access and create nodes, and establish relationships.

A third and quicker option is provided by the AcadToolImpl class. AcadToolImpl helper functions encapsulate the entire process of authoring ATC files. These helper functions create your catalogs, tool palettes, and instances of specialized tools. An additional function creates a generic command tool that simply executes an AutoCAD command. In some cases, you can publish your complete tool palette content with five or six lines of code.