Author Topic: ssget question (setq & filters)  (Read 2822 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
ssget question (setq & filters)
« on: April 29, 2008, 12:57:58 PM »
is it possible to multiple filter setq an ssget?

for example:
Code: [Select]
(setq ss1 (ssget))
(setq ss2 (ssget ss1 '((0 . "INSERT"))))
(setq ss3 (ssget ss1 '((0 . "*TEXT"))))
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: ssget question (setq & filters)
« Reply #1 on: April 29, 2008, 01:00:46 PM »
What are you trying to do?  If you want to select more than one type per ssget call, then just separate them with a comma.

(setq ss (ssget '((0 . "INSERT,*TEXT"))))

This will only select blocks (Insert) and any type of text (Text and MText).
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: ssget question (setq & filters)
« Reply #2 on: April 29, 2008, 01:28:43 PM »
i was trying to help a friend combine 2 routines.
the first will convert selected text to mtext
the 2nd (i combined this into 2 for him already) will set the mtext with a width of zero and then textmask it.

problem is you have to ssget all the text, but when it's time to select text to set width and mask, the ssget setq isn't valid anymore because the newly created mtext exists in place of the old text.

that's why i was thinking you could just ssget the .....i just realized that i answered my own question.

how can the you even ssget the orig ssget if it is invalid.

oh well, nevermind.

still though, would it be possible to do what i'm asking though.
say you window a section in a drawing. you want it to then move all selected text to a specific layer, hatch to a specific layer, etc.

not really a big deal (i have no plans for something like this), now i'm just curious.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: ssget question (setq & filters)
« Reply #3 on: April 29, 2008, 01:52:35 PM »
Once you make the mtext objects, then you can just add it to a selection set you create, because you can create a empty selection set.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: ssget question (setq & filters)
« Reply #4 on: April 29, 2008, 02:59:19 PM »
As Tim said you would add the new Mtext to the existing Selection Set.
Use (ssadd ename ss)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: ssget question (setq & filters)
« Reply #5 on: April 29, 2008, 03:39:45 PM »
As Tim said you would add the new Mtext to the existing Selection Set.
Use (ssadd ename ss)

hmm, well back to the drawing board...

what's ename?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

T.Willey

  • Needs a day job
  • Posts: 5251
Re: ssget question (setq & filters)
« Reply #6 on: April 29, 2008, 03:50:36 PM »
ename is the entity name, which is needed to add the entity to a selection set the way Alan shows.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: ssget question (setq & filters)
« Reply #7 on: April 29, 2008, 03:50:57 PM »
Select an object using (car (entsel)) to see  :-)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: ssget question (setq & filters)
« Reply #8 on: April 29, 2008, 03:59:33 PM »
Quote
ename is the entity name, which is needed to add the entity to a selection set the way Alan shows.

Select an object using (car (entsel)) to see  :-)

ah hah, i see.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox