Visual LISP and VBA on AutoCAD

Visual LISP in 64-bit AutoCAD 2015-based products and later are fully compatible with 32-bit Visual LISP. Existing Visual LISP code requires no change to run in 64-bit AutoCAD.

The behavior of VBA in 64-bit AutoCAD is not guaranteed to be identical to that of VBA in 32-bit AutoCAD. When the VBA IDE is active or when it is displaying a model window, there might be a slight delay in the repainting of AutoCAD window.

Prior to AutoCAD 2015-based products, object IDs were represented by 64-bit values. Accessing these values in 32-bit VBA would result in a compilation error. As an alternative, VBA applications could use an object’s handle instead of its object ID. The following samples show you would use the handle of an object instead of the object ID:

‘ Original code
Set objId = someObject.ObjectID
Set tempObj = ThisDrawing.ObjectIdToObject(objId)
‘ Code ported for 64-bit compatibility
Set objHandle = someObject.Handle
Set tempObj = ThisDrawing.HandleToObject(objHandle)

You should no longer need to worry about using handles instead of objectIDs, but using handles will allow you to support earlier releases if needed with the same code base.

Danger: VBA will be removed in a future version of AutoCAD. VBA developers should prepare to port their VB code to VB.NET.