Represents a Tool Block.
A tool block is a type of tool that can have 3D geometry associated with it. 3D geometry can be supplied to represent the shape of the tool block instead of an auto-generated shape derived from parameters.
| Name | Description |
| classType |
Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType(). |
| createFromJson |
Creates a Tool object from given JSON string. |
| createFromP21 |
Creates a Tool object given a string containing a tool defined using the P21 format. Throws an error if the given string does not conform to the P21 format. |
| toJson |
Generates and returns a JSON string that contains a description of this tool. |
| Name | Description |
| attributes | Returns the collection of attributes associated with this tool. Attributes are arbitrary key-value pairs organized into groups that can be used to store custom metadata on a tool. |
| description | Gets the descriptive text about the tool. Includes various pieces of information depending on the tool type. Usually contains the tool number, data describing the tool geometry and the description. In the UI, the same information is displayed in the operation tree or in the tool library table. |
| geometry | Get or set the geometry and attachment points for this tool block. A Null Object represents a tool without any 3D data associated. |
| isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference. |
| objectType | This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object. It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType(): |
| parameters | Gets the CAMParameters collection associated with this tool. This defines all of the settings that describe the details of the tool. |
| presets | Gets the ToolPresets collection associated with this tool. |