一个生成过滤器的子程序
(defun filter-pro (filter-list0 / filter-list1 filter-list2)<BR> (setq filter-list1 nil<BR> filter-list2 nil<BR> )<BR> (foreach temp2 filter-list0 (setq filter-list1 (cons (car temp2) filter-list1)))<BR> (foreach temp3 filter-list0 (setq filter-list2 (cons (cdr temp3) filter-list2)))<BR> (setq filter-type (vlax-make-safearray vlax-vbinteger (cons 0 (1- (length filter-list0)))))<BR> (vlax-safearray-fill filter-type (reverse filter-list1))<BR> (setq filter-data (vlax-make-safearray vlax-vbvariant (cons 0 (1- (length filter-list0)))))<BR> (vlax-safearray-fill filter-data (reverse filter-list2))<BR> (princ)<BR>)(filter-pro '((-4 . "<or")<BR> (-4 . "<and")<BR> (0 . "LWPOLYLINE")<BR> (70 . 1)<BR> (90 . 4)<BR> (-4 . "and>")<BR> (-4 . "<and")<BR> (0 . "POLYLINE")<BR> (70 . 1)<BR> (90 . 4)<BR> (-4 . "and>")<BR> (-4 . "or>")<BR> )<BR> )<BR> (vla-selectonscreen cic-sel filter-type filter-data) 谢谢
页:
[1]