本帖最后由 highflybird 于 2011-3-25 11:17 编辑
把
 - (defun c:CC2 ( / *error* *acad* doc ps osm as om emode pmode offd
改为:
 - (defun c:CC2 ( handle / *error* *acad* doc ps osm as om emode pmode offd
把
 - (not (setq e (car (entsel
- "\nSelect circle or closed polyline, ellipse or spline for trimming edge: "))))
改为:  - (not (setq e (handent handle)))
在vb中

- '前面是你的代码
- 'obj是你得到的object
- Set VL = CreateObject("VL.Application.16") '16这个数字根据CAD版本调整
- VL.ActiveDocument.Functions.Item("c:cc2").funcall Obj.Handle '获得一个obj的Handle
|