Custom Tool Palettes

Currently, we don't provide a tools palette API to customize the ARES Commander Tool Palette. In any case, you can add your own tools to a Tools Palette by adding the required information to the ARES Commander AppData.

Open the Tools Palette folder inside AppData. The AcTpCatalog file has all information about the tools that will be shown in the tool palette. 

 

Add your command to ARES Commander tools palette

Go to the folder Palettes, this folder contains several xml files which provide the information of the tools that will be shown in every tab from the tool palette. Open the file which corresponds to the tab Draw, Hatch, Annotations, etc. where you want to add your tool.

Once you open the file, add your <Tool> inside the Tools Group of the XML file. This is the schema that you need to follow.

ItemID:  GUID of the tool

Properties

Images: location of the icon that represents that tool

CustomData

AcRxClassInfo: information about the kind of class that it is created

ToolbarButton: id of the command definition

Tooltype

Flyout 

StockToolRef

Data

GeneralProperties: set the default values of the entity when it is created

Command: command that will be run

Code Snippet

<Tool option="0"> <ItemID idValue="{58201214-E9AD-45B9-B8C9-9201D22C161E}"/> <Properties> <Images> <Image IsDark="true" src=":/images/svg_icons/dark/draw/Line.svg"/> <Image IsDark="false" src=":/images/svg_icons/light/draw/line.svg"/> </Images> </Properties> <CustomData> <AcRxClassInfo className="AcDbLine"/> <ToolbarButton idButton="ID_LINE"/> </CustomData> <ToolType>2</ToolType> <Flyout enable="false"> <ShapePackage idValue="{4AFD3A7B-127C-468D-9DAD-D6D948BA8615}"/> <CurrentShape idValue="{A7FC31D7-54EB-4CC8-B5D8-539D51522D1A}"/> </Flyout> <StockToolRef idValue="{2AE7120B-CEE4-47A5-9B50-EF9F3ADE24AC}"/> <Data> <GeneralProperties> <Color> <BasicPropInfo> <PropValue unspecified="true"/> </BasicPropInfo> </Color> <Layer> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Layer> <Linetype> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Linetype> <LinetypeScale> <BasicPropInfo> <PropValue unspecified="true" value="0" valueType="3"/> </BasicPropInfo> </LinetypeScale> <lineWeight> <BasicPropInfo> <PropValue unspecified="true" value="0" valueType="2"/> </BasicPropInfo> </lineWeight> <PlotStyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </PlotStyle> <Textstyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Textstyle> <Dimstyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Dimstyle> <Tablestyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Tablestyle> </GeneralProperties> <Command> <Macro>^C^C_line</Macro> </Command> </Data> </Tool>

 

Custom Set of Tools

Another option is to create your own set of tools. In this case, open the AcTpCatalog.atc file and declare the tools tab that will contain your tools. These are the fields that need to be filled.

ItemID: reference to the GUID of the palette

Url: location of the ATC file that contains the definition of your set of tools.

Properties

ItemName: name of the tab palette

Example

<Palette> <ItemID idValue="{B0C328B7-4E6B-4FEE-A503-C3646DE4D23A}"/>     <Url href="Palettes\MyCommmands_B0C328B7-4E6B-4FEE-A503-C3646DE4D23A.atc"/>     <Properties>      <ItemName>MyCommands</ItemName>     </Properties> </Palette>

 

(You have to create a new GUID for each palette that you add)

Second step will be to define the tools for the palette. Create a file MyCommmands_B0C328B7-4E6B-4FEE-A503-C3646DE4D23A.atc inside the folder Palettes. Then complete the file with the following information

ItemID: GUID

Properties

ItemName: name of the tab

Tools: define all commands like in the previous

Code snippet:

<?xml version="1.0" encoding="UTF-8"?> <Palette> <ItemID idValue="{B0C328B7-4E6B-4FEE-A503-C3646DE4D23A}"/> <ReadOnly>0</ReadOnly> <Properties> <ItemName>MyCommands</ItemName> </Properties> <Tools> <Tool option="0"> <ItemID idValue="{507A26ED-1B9A-4461-9C69-C27A32600B91}"/> <Properties> <Images> <Image IsDark="true" src="Images/wheel_small.png"/> <Image IsDark="false" src="Images/wheel_small.png"/> </Images> </Properties> <CustomData> <AcRxClassInfo className="CWheel"/> <!--ToolbarButton idButton="ID_LINE"/--> </CustomData> <ToolType>2</ToolType> <Flyout enable="false"> <ShapePackage idValue=""/> <CurrentShape idValue=""/> </Flyout> <StockToolRef idValue="{2AE7120B-CEE4-47A5-9B50-EF9F3ADE24AC}"/> <Data> <GeneralProperties> <Color> <BasicPropInfo> <PropValue unspecified="true"/> </BasicPropInfo> </Color> <Layer> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Layer> <Linetype> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Linetype> <LinetypeScale> <BasicPropInfo> <PropValue unspecified="true" value="0" valueType="3"/> </BasicPropInfo> </LinetypeScale> <lineWeight> <BasicPropInfo> <PropValue unspecified="true" value="0" valueType="2"/> </BasicPropInfo> </lineWeight> <PlotStyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </PlotStyle> <Textstyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Textstyle> <Dimstyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Dimstyle> <Tablestyle> <BasicPropInfo> <PropValue unspecified="true" value="" valueType="1"/> </BasicPropInfo> </Tablestyle> </GeneralProperties> <Command> <Macro>^C^C_wheel</Macro> </Command> </Data> </Tool> </Tools> </Palette>