第2个回答 2012-08-03
Before you can use ActiveX functions with AutoLISP, you need to load the supporting code that enables these functions. Issue the following function call to load ActiveX support.
ActiveX functionality is not automatically enabled when you start AutoCAD or VLISP, so your programs must ensure that ActiveX is loaded. The following function call accomplishes this:
(vl-load-com)
If ActiveX support is not yet available, executing vl-load-com initializes the AutoLISP ActiveX environment. If ActiveX is already loaded, vl-load-com does nothing.
在CAD LISP中使用操作ActiveX 对象的函数前,必须(vl-load-com)函数来取得对ActiveX 对象操作函数的支持(即加载ActiveX 对象库函数),否则无效。