Stock Tools

Stock tools are generic templates for instances of specialized tools. They do not appear in the UI, nor do they implement tool functionality. Instead, they provide an entry point through which the Tool Palette framework creates actual tools.

Tool Palette applications implement a separate COM object for each stock tool they define. The framework creates instances of these COM objects when the Tool Palettes window is launched. Once a COM object is created, the framework queries it for an IAcadStockTool interface. IAcadStockTool consists of a single method, CreateTool(), that returns a pointer to an IAcadTool interface. The framework calls CreateTool() to instantiate a displayed tool object.

A stock tool must be registered with the Tool Palette framework, which means its information is stored in a special ATC file. The framework uses this information source, rather than the Windows registry, to identify and load its client modules. The AcTcStockTool class encapsulates the reading and writing of a stock tool's ATC registration information.