Creating a custom tool

[i]GeoGebra [/i]allows you to create your own [img]https://wiki.geogebra.org/uploads/thumb/d/d0/Mode_tool.svg/16px-Mode_tool.svg.png[/img] [i]C[size=100]ustom[/size] Tools[/i] based on an existing construction. [size=100]This means that you can extend the toolbar by creating your own tools.[/size] [br][br]Once created, your [i]Custom Tool[/i] can be used both with the mouse and as a command in the [i]Input Bar[/i]. All [i]Custom Tools[/i] are automatically saved in your [i]GeoGebra [/i]file.
Creating a custom tool
First, create the construction your tool should be able to create later on. In the [img]https://wiki.geogebra.org/uploads/thumb/a/a4/Menu-tools.svg/16px-Menu-tools.svg.png[/img] [i]Tools [/i]menu, select [img]https://wiki.geogebra.org/uploads/thumb/5/5c/Menu-tools-new.svg/16px-Menu-tools-new.svg.png[/img] [i]Create New Tool[/i] to open the corresponding dialog. Now you need to fill in the three tabs [i]Output Objects[/i], [i]Input Objects[/i], and [i]Name[/i] and [i]Icon[/i] to create your custom tool.
Task
Let’s now create a tool that determines the minimal distance between a line and a point (e.g. altitude in a triangle). [br]Before you can create your custom tool you need to construct all the objects required for your tool.
Instructions
[table][tr][td][size=100]1.[/size][/td][td][size=100][size=100][icon]https://wiki.geogebra.org/uploads/thumb/a/a4/Menu-tools.svg/120px-Menu-tools.svg.png[/icon][/size][/size][/td][td][size=100]Open the [img]https://wiki.geogebra.org/uploads/thumb/f/f6/Menu-button-open-menu.svg/16px-Menu-button-open-menu.svg.png[/img] Menu in the top right corner and select [i]Tools[/i].[br][/size][/td][/tr][tr][td][size=100]2.[/size][/td][td][size=100][icon]https://wiki.geogebra.org/uploads/thumb/5/5c/Menu-tools-new.svg/120px-Menu-tools-new.svg.png[/icon][/size][/td][td][size=100]Select [i]Create New Tool[/i] to open the[i] Create New Tool[/i] dialog.[br][/size][/td][/tr][tr][td][size=100][/size][/td][td][size=100][/size][/td][td][size=100][b]Note:[/b] By default, tab [i]Output Objects[/i] is activated.[br][/size][/td][/tr][tr][td][size=100]3.[/size][/td][td][size=100][/size][/td][td][size=100]Specify the output objects of your new tool by either selecting the desired [br]output object in the [i]Graphics View [/i](example below: segment [i]c[/i]) or selecting it from the drop down menu (click on the little arrow next to the input field).[/size][/td][/tr][tr][td][size=100]4.[/size][/td][td][size=100][/size][/td][td][size=100]Click the [i]Next >[/i] button to activate tab [i]Input Objects[/i].[/size][/td][/tr][tr][td][size=100]5.[br][/size][/td][td][size=100][/size][/td][td][size=100][i]GeoGebra [/i]fills in the corresponding input objects for your tool automatically (example below: points [i]A[/i], [i]B[/i] and [i]C[/i]).[/size][/td][/tr][tr][td][size=100]6.[br][/size][/td][td][size=100][/size][/td][td][size=100]Click the [i]Next >[/i] button to activate tab [i]Name & Icon[/i].[/size][/td][/tr][tr][td][size=100]7.[br][/size][/td][td][size=100][/size][/td][td][size=100]Fill in the name [i][size=100]Altitude[/size] [/i]for your tool and a text for the [i]Tooltip[/i] (e.g. Click on three points).[br][/size][/td][/tr][tr][td][size=100][/size][/td][td][size=100][/size][/td][td][size=100][b]Note:[/b] [i]GeoGebra [/i]fills in the text field [i]Command name[/i] automatically..[br][/size][/td][/tr][tr][td][size=100]8.[/size][/td][td][size=100][/size][/td][td][size=100]Click the [i]Finish[/i] [size=100]button to confirm.[/size][br][/size][/td][/tr][/table][size=100][br][b]Hint: [/b]Your new tool is now part of the [i]GeoGebra Toolbar[/i].[/size]
Try it yourself...
Saving your custom tool
You can save your custom tools so you can reuse them in other [i]GeoGebra [/i]constructions. In the [i]Tools [/i]menu, select [img]https://wiki.geogebra.org/uploads/thumb/a/a4/Menu-tools.svg/16px-Menu-tools.svg.png[/img] [i]Manage Tools[/i] to open the dialog. Then, select the custom tool you want to save from the appearing list. Select [i]Save As…[/i] to save your custom tool on your computer.[br][br][table][tr][td]1.[br][/td][td][size=100][icon]https://wiki.geogebra.org/uploads/a/a4/Menu-tools.svg[/icon][/size][br][/td][td][size=100]Open the [img]https://wiki.geogebra.org/uploads/thumb/f/f6/Menu-button-open-menu.svg/16px-Menu-button-open-menu.svg.png[/img] Menu in the top right corner and select [i]Tools[/i].[/size] [br][/td][/tr][tr][td][size=100]2.[/size][/td][td][size=100][icon]https://wiki.geogebra.org/uploads/thumb/a/a4/Menu-tools.svg/120px-Menu-tools.svg.png[/icon][/size][/td][td][size=100]Select [i]Manage Tools[/i] to open the [i]Manage Tools[/i] dialog.[/size][/td][/tr][tr][td][size=100]3.[/size][/td][td][size=100][/size][/td][td][size=100]Select the custom tool [i]Altitude[/i] from the list of available tools.[/size][/td][/tr][tr][td][size=100]4.[/size][/td][td][size=100][/size][/td][td][size=100]Select [i]Save As ...[/i]to save your custom tool and make it available for future constructions.[/size][/td][/tr][tr][td][size=100]5.[/size][/td][td][size=100][/size][/td][td][size=100]Choose a name for your custom tool (e.g. [i]Altitude_tool[/i]) and save it on [i]GeoGebra[/i].[br][/size][/td][/tr][/table]
Importing a custom tool
After saving your custom tool you are able to reuse it in future constructions and import it into a new [i]GeoGebra [/i]construction at any time. By default the [i]GeoGebra Toolbar [/i]doesn’t include any custom tools. To reuse one of your custom tools you need to import it into your new [i]GeoGebra [/i]construction.[br][br][table][tr][td][size=100]1.[/size][/td][td][size=100][icon]https://wiki.geogebra.org/uploads/thumb/8/88/Menu-button-open-search.svg/120px-Menu-button-open-search.svg.png[/icon][/size][/td][td][size=100]Select [i]Open[/i] from the [i]File[/i] menu.[br][/size][/td][/tr][tr][td][size=100]2.[/size][/td][td][size=100][/size][/td][td][size=100]Look for the custom tool you saved earlier (e.g. [i]Altitude_tool[/i]) and select it from the list of available [i]GeoGebra [/i]files and tool files.[br][/size][/td][/tr][tr][td][br][/td][td][icon]https://wiki.geogebra.org/uploads/thumb/e/e0/GGB-Tool-Circumcircle-Screenshot.png/32px-GGB-Tool-Circumcircle-Screenshot.png[/icon][br][/td][td][b]Hint:[/b] You can also search for the [i]Circumcenter_tool[/i] from the [i]GeoGebra [/i]Team.[br][/td][/tr][tr][td][size=100]3.[/size][/td][td][size=100][icon]https://wiki.geogebra.org/uploads/thumb/d/d1/Menu-edit.svg/120px-Menu-edit.svg.png[/icon][/size][/td][td][size=100]Select [i]Edit[/i] to use this tool in your applet.[/size][/td][/tr][/table][size=100][br][b]Hint:[/b] Open your custom tool before you start with your construction and read the appearing [i]Tooltip[/i]![/size]
Try it yourself...

Information: Creating a custom tool