ErrorEntry collection

AutoCAD Map 3D ActiveX

ErrorEntry collection

A collection of diagnostic parameters, one set for each error.

User-created by adding an error to the error stack, or API-created by an error condition.

Diagnostic parameters, such as the error message, provide clues about why the error occurred. Properties of the error entry include code, type, and message for the error. Methods are typical for a collection. For more information, click .

The following example adds a nonexistent file to the drawing set and shows how to display all messages in the error stack.

Dim amap As AcadMap

Dim prj As Project

Dim i As Long

Dim strOutput As String

Dim ee As ErrorEntry

On Error GoTo ErrHandler

Set amap = ThisDrawing.Application. _

GetInterfaceObject("AutoCADMap.Application") 

Set prj = amap.Projects(ThisDrawing)

prj.DrawingSet.Add ("c:\\nofile.dwg")

Exit Sub

ErrHandler:

For Each ee In amap.ErrorStack

strOutput = strOutput & ee.ErrMessage & Chr(13) 

Next

MsgBox strOutput