Alexander V. Koshman
2003-12-16 10:41:33 UTC
Hello NG!
-------------
I want to try to work with ActiveX part of VLISP and can't achieve
success...
I have to realize ActiveX variant of:
;;; (setq ss (ssget "x" '((8 . "Layer1"))))
And AutoCAD selects ALL the objects and doesn't filter them!
What I do wrong???
(setq acad (vlax-get-Acad-Object))
(setq doc (vla-get-ActiveDocument acad))
(setq ss (vla-add (vla-get-SelectionSets doc) "temp_ss"))
(vla-select ss acSelectionSetAll
(vlax-SafeArray-Fill (vlax-Make-SafeArray vlax-vbInteger (cons 0 0))
(list
8))
(vlax-SafeArray-Fill (vlax-Make-SafeArray vlax-vbVariant (cons 0 0))
(list
"Layer1"))
) ; - 'vla-select'
(alert (strcat "Number of objects: " (itoa (vla-get-Count ss))))
----------------------------
Alexander V. Koshman
-------------
I want to try to work with ActiveX part of VLISP and can't achieve
success...
I have to realize ActiveX variant of:
;;; (setq ss (ssget "x" '((8 . "Layer1"))))
And AutoCAD selects ALL the objects and doesn't filter them!
What I do wrong???
(setq acad (vlax-get-Acad-Object))
(setq doc (vla-get-ActiveDocument acad))
(setq ss (vla-add (vla-get-SelectionSets doc) "temp_ss"))
(vla-select ss acSelectionSetAll
(vlax-SafeArray-Fill (vlax-Make-SafeArray vlax-vbInteger (cons 0 0))
(list
8))
(vlax-SafeArray-Fill (vlax-Make-SafeArray vlax-vbVariant (cons 0 0))
(list
"Layer1"))
) ; - 'vla-select'
(alert (strcat "Number of objects: " (itoa (vla-get-Count ss))))
----------------------------
Alexander V. Koshman