Use a Custom Tool as a Custom Command

Navigation:  Appendix > Advanced Topics > Advanced Tool Topics >

Use a Custom Tool as a Custom Command

Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

Normally you use the Custom Tools menu to choose a tool, and then employ the chosen tool by clicking in your sketch.

You can also use the Custom Tools menu to choose commands, called custom commands, that have the same effect as applying the tool to the selected objects.

To use a custom command:

1.Select the tool’s required given objects, in the order listed in the custom tool’s Script View. (There is no need to have previously chosen the desired tool or to have the Script View visible.)

2.Hold the Alt key (Windows) or key (Mac) while pressing the Custom tool icon. The items listed in the menu are unchanged, but with the modifier key down they represent custom commands rather than custom tools.

Custom commands that can be applied to the selected objects are enabled; all others are disabled.

3.Choose the desired command to apply it to the selections.


If the meaning is not ambiguous, you can select multiple objects to satisfy the script’s given objects multiple times. For example, if you have a Perpendicular Segment tool that constructs a perpendicular segment to a given line from a given point, you can select a point and a line to enable the Perpendicular Segment custom tool. You can also select, for example, five points and one line to enable the command, which now appears as Perpendicular Segment (5x). Similarly, you can select one point and three lines to enable the command as Perpendicular Segment (3x).

Using a custom command does not change your currently chosen custom tool.

Missing Assumed Object for a Custom Command

A custom tool may be set to automatically match one or more of its given objects to object(s) in the sketch with the same name. In the Script View, such an object appears in the Assuming section, before the Given section.

When you use such a tool, any assumed objects are matched immediately, without any action on your part. You only have to click to match objects in the Given section. If an assumed object is missing, then you must click to match that assumed object before matching the given objects.

When you use a custom command, assumed objects are similarly matched automatically (based on their names) to objects in the sketch, and the selected objects are matched to the given objects.

If the sketch does not contain a properly-named object of the correct type to match an assumed object, the command cannot be applied to the selected objects. In this case a dialog box appears, and you must name a sketch object properly to match the assumed object of the tool. (You may need to create the assumed object before naming it correctly.)

Depending on the type of object that's missing, you may be able to use the dialog box to tell Sketchpad to create such an object at random and name it appropriately.