PowerMillImportedToolLibrary Object Preview

Derived from: Base Object
Defined in namespace "adsk::cam" and the header file is <Cam/Tools/PowerMillImportedToolLibrary.h>

PreviewThis functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.

Description

Contains the result of importing tool definitions from a PowerMill project or project archive.

Create an instance with importFromPowerMillProject. Each PowerMill tool is converted to a Fusion tool where supported; unsupported or unrecognized types are omitted and reported in the import diagnostics.

Use generateImportDiagnosticsJSON or generateImportReport to inspect issues. Use convertToToolLibrary to obtain a ToolLibrary containing the successfully converted tools and holders.

Methods

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().

convertToToolLibrary

Returns a ToolLibrary containing the successfully converted tools and holders.

Tools that failed to import are excluded. Tools with warning-level issues are included only when isIncludingToolsWithWarnings is true. Tools with errors are never included.

generateImportDiagnosticsJSON

Generates and returns a JSON string that summarizes import diagnostics, including library-scope issues and per-tool metadata and issue codes. Use issueDescription to look up a localized message for an issue code.

generateImportReport

Generates and returns a localized, human-readable report of the import.

The report summarizes succeeded and failed tool counts, library-scope issues, and a per-tool breakdown with each entry's status and issues.

importFromPowerMillProject

Imports tool definitions from a PowerMill project or project archive.

The returned object is transient and is not persisted in Fusion. Inspect import results with generateImportDiagnosticsJSON, generateImportReport, or issueDescription, then call convertToToolLibrary to obtain the converted tools.

issueDescription

Returns a localized description of a PowerMill import issue code.

Issue codes appear in the JSON returned by generateImportDiagnosticsJSON.

Properties

Name Description
isIncludingToolsWithWarnings Gets or sets whether tools with warning-level issues are included by convertToToolLibrary. The default value is true.

Warning-level issues indicate that some source data was missing or replaced with fallback values, but a usable tool was still produced.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
numberOfFailedToolImports Gets the number of tool entries that failed to import.

When isIncludingToolsWithWarnings is false, tools with warning-level issues count as failed. When true, they count as succeeded.
numberOfHolders Gets the number of standalone holder entries produced by the import.
numberOfSucceededToolImports Gets the number of tool entries that imported successfully.

When isIncludingToolsWithWarnings is true, tools with warning-level issues count as succeeded. When false, they count as failed.
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():

Accessed From

PowerMillImportedToolLibrary.importFromPowerMillProject

Version

Introduced in version October 2026