本帖最后由 作者 于 2002-12-13 16:30:32 编辑
http://www.mjtd.com/bbs/dispbbs.asp?boardID=3&RootID=12521&ID=12521
(VL-LOAD-COM)
(defun TEST (PL1 PL2 / IPTS PTS)
(setq IPTS (vla-intersectwith
(vlax-ename->vla-object PL1)
(vlax-ename->vla-object PL2)
acExtendNone ;Does not extend either object
)
IPTS (vlax-variant-value IPTS)
)
(if (> (vlax-safearray-get-u-bound IPTS 1) 0)
(progn (setq IPTS
(vlax-safearray->list IPTS)
)
(while (> (length IPTS) 0)
(setq PTS (cons (list (car IPTS)
(cadr IPTS)
(caddr IPTS)
)
PTS
)
IPTS (cdddr IPTS)
)
)
)
)
PTS
)
;;USAGE: (TEST (car (entsel)) (car (entsel)))
[此贴子已经被作者于2002-12-13 13:00:31编辑过]
[此贴子已经被作者于2002-12-13 13:10:25编辑过] |