Before the procedures will run, however, you must connect the declared object in the class module with the Circle object.
Dim X As New EventClassModule
Sub InitializeEvents() Dim MyCircle As AcadCircle Dim centerPoint(0 To 2) As Double Dim radius As Double centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0# radius = 5# Set MyCircle = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius) Set X.Object = MyCircle End Sub
Call InitializeEvents
Once the InitializeEvents procedure has been run, the Circle object in the class module points to the Circle object created, and any event procedures in the class module will run when the events occur.