Egads. I just realized I posted the wrong code. This was a cut/paste from another file, except I got the interim file instead of the final one. My apologies to anyone who tried to use the first one. Here's the correct, working, one:
;| Create an ActiveX selection Set. May use selset filters. (c) Jeff Mishler Jan 2004
Usage:
Don't apply Filters: (setq ss (active_ss nil nil))
Apply Filters: (setq ss (active_ss '(0) '("LINE")))
The filter lists must comply with the standard ss filters, the first being the list of dxf codes '(0 8 2) and the second is the dxf value, ie: '("LINE") or '("LINE,ARC" "0,TEST"), etc. |; (defun active_ss (code val / ss) (vl-catch-all-apply 'vla-add (list (vla-get-selectionsets *doc*) "activex_ss")) (setq ss (vla-item (vla-get-selectionsets *doc*) "activex_ss")) (vla-clear ss) (if code (progn (setq code (vlax-safearray-fill (vlax-make-safearray vlax-vbinteger (cons 0 (- (length code) 1)) ) code ) val (vlax-safearray-fill (vlax-make-safearray vlax-vbvariant (cons 0 (- (length val) 1)) ) val ) ) (vlax-invoke-method ss 'selectonscreen code val) ) (vla-selectonscreen ss) ) (vla-highlight ss :vlax-true) ss )
Jeff