AcSelectionSetAll Method

Ken Alexander

Usenet Archive
Joined
Jul 10, 2003
Messages
193
Reaction score
0
It appears in VBA you can use selectionsetall mode with filters in the select method, I have attempted this in lisp with no success. Is it possible? I know I can use (ssget "x" '((0 . "line"))).

(vla-select
selset
acSelectionSetall
(vlax-safearray-fill
(vlax-make-safearray
vlax-vbinteger
(cons 0 (1- (length (car dxfcode))))
)
(car dxfcode)
)
(vlax-safearray-fill
(vlax-make-safearray
vlax-vbvariant
(cons 0 (1- (length (cadr dxfcode))))
)
(cadr dxfcode)
)
)
 
Thanks Luis, I've looked thru there sight could only find info on vla-selectonscreen method. The help files indicate that you can filter acselectionsetall but it's not working.
 
Frank's BuildFilter function is my all time favorite. It's especially fun if you turn on the animation feature of the vlide. However, I now prefer to create my selection sets with the venerable old SSGET and then "convert" it to ActiveX.

( if (ssget "_X" '((0 . "LINE")))
(setq ss
(vla-get-activeSelectionSet
(vla-get-activeDocument
(vlax-get-acad-object)
)
)
)
)

This technique does not work with selection sets created with SSADD.
 
I could not find the BuildFilter function at Acadx. Are you saying that it can be done then? Like I told Luis this is just for fun, I can't get it to work and was wondering if it was something I was doing wrong.
 
Hey I like that. Much easier to follow than my

(setq ss (vlassget '((0 8)("line" "0")) T))
 
I thought it was interesting that the method *didn't* barf on the arrays being passed to the point arguments.

--
R. Robert Bell, MCSE
www.AcadX.com

| Geeze..... Something so simple.
| Thanks Robert.
|
| --
| Ken Alexander
| Acad2000
| Windows2000 Prof.
|
| "We can't solve problems by using the same kind
| of thinking we used when we created them."
| --Albert Einstein
|
| | > You forgot to account for two "optional" arguments. | > | > (vla-select selset | > acSelectionSetall | > nil ; <- Point1 | > nil ; <- Point2 | > (vlax-safearray-fill | > (vlax-make-safearray | > vlax-vbinteger | > (cons 0 (1- (length (car filter))))) | > (car filter)) | > (vlax-safearray-fill | > (vlax-make-safearray | > vlax-vbvariant | > (cons 0 (1- (length (cadr filter))))) | > (cadr filter)))
| >
 
I know.. If it had, I might have caught it. Usually when optionals are omitted, error, error...
 

Latest threads

Back
Top