About AutoCAD JavaScript APIs
The AutoCAD JavaScript Application Programming Interface (API) enables you to do in-canvas user interface activities, manipulate current zoom, and implement out-of-canvas user interface dialogs using HTML5.
The AutoCAD JavaScript APIs allows you to do:
- In canvas user interface activities, such as prompts and displaying transient graphics.
- Change the view of an object, such as zoom, pan, switch visual styles.
- Out-of-canvas user interface to be built with the combination of HTML5 and JavaScript such as palettes, dialogs that can show properties of drawing objects and interact with the drawing.
The JavaScript object model, as of now, for AutoCAD core engine covers:
- Prompts
- Transient graphics and input
- Dragger
- View manipulation
- Commands
- Windows
- Drawing object operations and events
- Bindable Object Layer (BOL)
- Application Object
The current version of the JavaScript API (v3) can be found here: https://df-prod.autocad360.com/jsapi/v3/Autodesk.AutoCAD.js
The JavaScript API (v3) Reference Guide provides an explaination of the available functions.
Migrate from an Earlier Version
exec
Function
The exec
function has been deprecated from the API and synchronous calls from the JavaScript API are no longer supported. Use the execAsync()
function for asynchronous calls.
Removed Functions
A list of removed functions can be found under Obsolete Functions.
History
The previous versions of the JavaScript API can be found here: