By now, there has been lots of information circulating about what is new in AutoCAD 2014 from an end user perspective but what about the API side of things. AutoCAD 2014 offers a number of API changes, updates to the documentation, and a new API.
First and foremost, AutoCAD 2014 is binary compatible with AutoCAD 2013; programs developed for AutoCAD 2013 should run in AutoCAD 2014 without needing to be recompiled.
JavaScript API
This new API is used to provide the core functionality of the DesignFeed and Live Maps features. What can be done with this new API at the moment is limited, but does open up many new possibilities though. For additional information see:
- JavaScript Reference Guide
- Zooming to an AutoCAD entity using JavaScript - Through the Interface (Kean Walmsley)
- Getting Started with JavaScript API on AutoCAD 2014 - AutoCAD DevBlog (Philippe Leefsma)
- Enabling AutoCAD 2014 JavaScript Debugging - AutoCAD DevBlog (Fenton Webb)
Trusted File Paths
Not just an API change but a security change to which files are automatically loaded and from where they can be loaded from. This change impacts all program file types. There are a few API level changes that you should be aware of, but if your programs are not trusted they do not matter much. So the first things you need to be aware of are the SECURELOAD system variable and the Trusted Locations node on the Files tab of the Options dialog box. For additional information see:
- AutoCAD 2014 and Security - AutoCAD DevBlog (Gopinath Taget)
- AutoCAD 2014 for developers - Through the Interface (Kean Walmsley)
VBA 7.1
Microsoft has recently given new life to the once deprecated VBA technology. VBA 6.3 was the last supported release, which was still being used in AutoCAD 2013 as long as you downloaded the separate installer. VBA 6.3 was 32-bit only and is why there was performance issues when using it with AutoCAD 64-bit. VBA 7.1 resolves this issue by supporting both 32-bit and 64-bit platforms. If you have VBA programs from AutoCAD 2013 or earlier, and you are using Windows 64-bit you might encounter issues if you are using third-party libraries or form controls that do not support 64-bit. Check with the third-party vendor and see if they offer a 64-bit version for you to use, if not you will need to rework your code and/or forms.
The ActiveX/VBA document has also been updated as well and can be found installed on your local drive at:
- %ProgramFiles%\Common Files\Autodesk Shared\acad_aag.chm - Developer's Guide
- %ProgramFiles%\Common Files\Autodesk Shared\acadauto.chm - Reference Guide
AutoLISP
There were no real notable changes to the API this release or the Visual LISP IDE, with the exception of two new functions.
- showHTMLModalWindow - Displays a modal window with a HTML document; use in conjunction with the new JavaScript API.
- findtrustedfile - Searches the AutoCAD trusted file paths for the specified file.
ObjectARX
Changes to the ObjectARX API are limited to new classes and functions.
- AcDb
- AcDbExtents2d - New class
- AcDbGeoDataReactor - New class
- AcDbModelDocViewStyle - New methods added; existing class
- AcDbXrecord - New method added; existing class
- AcDbXrecordIterator - New methods added; existing class
- AcAp
- AcApDocument - New method added; existing class
- Global functions
- acedAddHTMLPalette - New
- acedFindTrustedFile - New
- acedLoadJSScript - New
- acedShowHTMLModalWindow - New
- acedShowHTMLModelessWindow - New
- Miscellaneous class
- IPointCloudFilter2 - New
Managed .NET
Changes to the Managed .NET API are limited to new classes and functions.
- Autodesk.AutoCAD.ApplicationServices
- Application.ShowModalWindow Method
- Application.ShowModelessWindow Method
- Document.IsNamedDrawing Property
- Autodesk.AutoCAD.DatabaseServices
- MLeader.Scale Property
- Region.AreaProperties Method
- RegionAreaProperties Structure
- RegionAreaProperties.Area Property
- RegionAreaProperties.Centroid Property
- RegionAreaProperties.Extents Property
- RegionAreaProperties.MomentsOfInertia Property
- RegionAreaProperties.Perimeter Property
- RegionAreaProperties.PrincipalMoments Property
- RegionAreaProperties.ProductOfInertia Property
- RegionAreaProperties.RadiiOfGyration Property
- Xrecord.Append Method
- XrecordEnumerator.Current Property
- XrecordEnumerator.InsertAtCurrent Method
- XrecordEnumerator.RemoveCurrent Method
- Autodesk.AutoCAD.EditorInput
- Editor.ApplyCurDwgLayerTableChanges Method
- Editor.PostCommandPrompt Method
- Autodesk.AutoCAD.GraphicsInterface
- TextStyle.FromTextStyleTableRecord Method
- TextStyle.ToTextStyleTableRecord Method
- Autodesk.AutoCAD.Windows
- Window.Focus Method
- Autodesk.AutoCAD.ApplicationServices.Core
- Application.LoadJSScript Method
The Developer's Guide was updated in the following areas were changed:
- Viewports and layouts
- Plotting and publishing
- Document events
- Disposal of objects
- Plot styles
- Visual styles and render presets
- Raster images and xrefs
- Clipping blocks, xrefs, and raster images
- Defining and inserting blocks, and working with attributes
The .NET Developer's Guide is part of the product help.
Hope this helps give you an understanding of the changes that you might or might not need to make with your custom programs.
Sincerely,
Lee
Recent Comments