本帖最后由 作者 于 2008-1-23 12:57:24 编辑
给你一个例子: Private Sub AcadDocument_EndCommand(ByVal CommandName As String) If CommandName = "VBALOAD" Or CommandName = "APPLOAD" Then Call Commandks End If End Sub Sub Commandks() '对每一个定义的宏进行命令行的预先录制批处理 ThisDrawing.SendCommand "(defun C:zdx()(vl-vbarun " & Chr$(34) & "azj" & Chr$(34) & "))" & Chr$(13) ThisDrawing.SendCommand "(defun C:sz()(vl-vbarun " & Chr$(34) & "abc" & Chr$(34) & "))" & Chr$(13) ThisDrawing.SendCommand "(defun C:sb()(vl-vbarun " & Chr$(34) & "cde" & Chr$(34) & "))" & Chr$(13) End Sub
************************************************* 西北凡人-------http://www.abofanyi.com/blog |