我照帮助上写个例子,是事件的,就是打印的时候msgbox文件名 ThisDrawing代码: Dim X As New EventClassModule Call InitializeEvents
Sub InitializeEvents() Set X.Doc = ThisDrawing End Sub
EventClassModule代码: Public WithEvents Doc As AcadDocument
Private Sub Doc_BeginPlot(ByVal DrawingName As String) MsgBox (DrawingName) End Sub 运行时出现Call那里是无效外部过程什么的 其实我想加载了这个工程后打印的时候就可以起作用了,但现在要每次指定运行InitializeEvents以后打印才有效果,我应该怎么改啊?