Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Jarvis, Drew
Message 1 of 11 (150 Views)

paperspace selection sets

150 Views, 10 Replies
01-10-2002 10:03 PM
I wish to collect a selection set of blocks in paperspace of a certain name.
For model space I would use the following line:

(setq x1 (ssget "_x" '((2 . "*etc*") (410 . "model"))))

I am stumped when it comes to setting paperspace as the 410 ssget list value
as the name can be modified and I need it to work in all drawings. I tried
setting a variable to the paperspace layout name and using a print function
at the (410 . "model") point but without sucess. I was wondering if someone
can point me in the right direction

Many thanks.

Drew Jarvis
ACDP
*Jones, Bobby C.
Message 2 of 11 (150 Views)

Re: paperspace selection sets

01-10-2002 10:15 PM in reply to: *Jarvis, Drew
Assuming the variable myLayout contains the name of the layout you are
filtering for:
(setq x1 (ssget "_x" (list (2 . "*etc*") (cons 410 myLayout)))))

check my parens...I didn't test...
--
Bobby C. Jones
http://www.acadx.com
*Jarvis, Drew
Message 3 of 11 (150 Views)

Re:

01-10-2002 10:34 PM in reply to: *Jarvis, Drew
(cons 410 myLayout)

Thanks

Drew Jarvis


"Bobby C. Jones" wrote in message
news:52E9F3371B88E76896D632A7205C8080@in.WebX.maYIadrTaRb...
> Assuming the variable myLayout contains the name of the layout you are
> filtering for:
> (setq x1 (ssget "_x" (list (2 . "*etc*") (cons 410 myLayout)))))
>
> check my parens...I didn't test...
> --
> Bobby C. Jones
> http://www.acadx.com
>
>
>
*Jones, Bobby C.
Message 4 of 11 (150 Views)

Re:

01-10-2002 10:41 PM in reply to: *Jarvis, Drew
Cliff, *DON'T* try this in VBA :-) selection set filters in VBA don't allow
filtering on the 410 group...
--
Bobby C. Jones
http://www.acadx.com
*Piercey, Jason
Message 5 of 11 (150 Views)

Re:

01-10-2002 10:42 PM in reply to: *Jarvis, Drew
>(setq x1 (ssget "_x" (list (2 . "*etc*") (cons 410 myLayout))))

Don't you need to quote the (2 . "*etc*")?

(setq x1 (ssget "_x" (list '(2 . "*etc*") (cons 410 myLayout))))

-Jason



"Bobby C. Jones" wrote in message
news:52E9F3371B88E76896D632A7205C8080@in.WebX.maYIadrTaRb...
> Assuming the variable myLayout contains the name of the layout you are
> filtering for:
> (setq x1 (ssget "_x" (list (2 . "*etc*") (cons 410 myLayout)))))
>
> check my parens...I didn't test...
> --
> Bobby C. Jones
> http://www.acadx.com
>
>
>
*Jones, Bobby C.
Message 6 of 11 (150 Views)

Re:

01-10-2002 10:49 PM in reply to: *Jarvis, Drew
I should have said check *everything*...I didn't test nothing :-)
Thanks Jason
--
Bobby C. Jones
http://www.acadx.com
*Turvill, Paul
Message 7 of 11 (150 Views)

Re: paperspace selection sets

01-11-2002 02:53 AM in reply to: *Jarvis, Drew
(ssget "x" '((0 . "insert")(2 . "*etc*")(410 . "~Model")))
___

"Drew Jarvis" wrote in message
news:84DAE30CE893CB244CDB7D8517FB9E75@in.WebX.maYIadrTaRb...
>
> I wish to collect a selection set of blocks in paperspace of a certain
name.
*Tanzillo, Tony
Message 8 of 11 (150 Views)

Re: paperspace selection sets

01-11-2002 03:55 AM in reply to: *Jarvis, Drew
Using (410 . "~tabname") works, but you can just as easily
use the 67 group, which can be more "efficient".

(ssget "x" '(.... (67 . 1))) ;; 1 = Paper space only

(ssget "x" '(.... (67 . 0))) ;; 0 = Model space only


"Drew Jarvis" wrote in message
news:84DAE30CE893CB244CDB7D8517FB9E75@in.WebX.maYIadrTaRb...
>
> I wish to collect a selection set of blocks in paperspace of a certain
name.
> For model space I would use the following line:
>
> (setq x1 (ssget "_x" '((2 . "*etc*") (410 . "model"))))
>
> I am stumped when it comes to setting paperspace as the 410 ssget list
value
> as the name can be modified and I need it to work in all drawings. I tried
> setting a variable to the paperspace layout name and using a print
function
> at the (410 . "model") point but without sucess. I was wondering if
someone
> can point me in the right direction
>
> Many thanks.
>
> Drew Jarvis
> ACDP
>
>
Distinguished Contributor
msarqui
Posts: 134
Registered: ‎09-14-2010
Message 9 of 11 (97 Views)

Re: paperspace selection sets

02-15-2013 10:40 AM in reply to: *Tanzillo, Tony

And how to make the selection set for both model and paper space in the same routine?

Ex.: How to select all hacths in model and paper space?

*Expert Elite*
Kent1Cooper
Posts: 5,518
Registered: ‎09-13-2004
Message 10 of 11 (93 Views)

Re: paperspace selection sets

02-15-2013 11:13 AM in reply to: msarqui

msarqui wrote:

And how to make the selection set for both model and paper space in the same routine?

Ex.: How to select all hacths in model and paper space?


You can make a selection set [in AutoLISP terms] of all Hatch patterns in model and paper space easily enough, with:
(ssget "_X" '((0 . "HATCH")))

But you can't have an AutoCAD command "select" and do something with those that are not in the current space.  [See the hatch-to-back thread for a workaround, unless you're asking this for some different reason.]

Kent Cooper
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.