Author Topic: SSget help  (Read 4634 times)

0 Members and 1 Guest are viewing this topic.

Tortiz

  • Guest
SSget help
« on: June 10, 2013, 01:42:04 PM »
I want to do a selected set per tab. somthing like:

(setq test (ssget "_x"))

but the documation I have do not have a filter for a tab.
Any Ideas?

kpblc

  • Bull Frog
  • Posts: 396
Sorry for my English.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SSget help
« Reply #2 on: June 10, 2013, 02:26:11 PM »
Code - Auto/Visual Lisp: [Select]
  1. ;;  ****     C U R R E N T   S P A C E   O N L Y      ****
  2. ;;  Limit the _X filter to current tab model space which ever is active
  3. (setq ss (ssget "x" (list (cons 0 "*POLYLINE") (cons 410 (getvar "ctab")))))
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.

Tortiz

  • Guest
Re: SSget help
« Reply #3 on: June 10, 2013, 03:05:33 PM »
Thanks!!

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: SSget help
« Reply #4 on: June 10, 2013, 04:38:26 PM »
To account for being in a viewport:

Code: [Select]
(if (eq (getvar 'CVPORT) 1)
  (cons 410 (getvar 'CTAB))
  '(410 . "Model")
)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SSget help
« Reply #5 on: June 11, 2013, 03:27:11 AM »
To account for being in a viewport:
Now that might be a difficult one! What if the user wanted to select all objects in MS which are visible through the current tab's viewports.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: SSget help
« Reply #6 on: June 11, 2013, 07:36:21 AM »
To account for being in a viewport:
Now that might be a difficult one! What if the user wanted to select all objects in MS which are visible through the current tab's viewports.
Do you mean only the objects visible within a viewport?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SSget help
« Reply #7 on: June 12, 2013, 01:37:22 AM »
Do you mean only the objects visible within a viewport?
Exactly. Which means you'd need the coordinates of the VP (or cropped vectors if so), and also the layers which aren't VP-Frozen.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: SSget help
« Reply #8 on: June 12, 2013, 03:53:09 AM »
... and also the layers which aren't VP-Frozen.
Using (ssget "_A") solves this. Plus there is no need for a ctab filter.

bruno_vdh

  • Guest
Re: SSget help
« Reply #9 on: June 12, 2013, 04:29:13 AM »
Hello,
Quote
Exactly. Which means you'd need the coordinates of the VP (or cropped vectors if so), and also the layers which aren't VP-Frozen.

To the game...
Code: [Select]
(ssget "_C" '(-1e99 -1e99) '(1e99 1e99))

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SSget help
« Reply #10 on: June 12, 2013, 06:54:13 AM »
To the game...
Code: [Select]
(ssget "_C" '(-1e99 -1e99) '(1e99 1e99))
That's actually a very good idea. Thus you'd need to run the PSpace command, Zoom Extents, then run MSpace, then set CVport = 2, get that selection and increment until you don't have any more VP's, each time adding the selection for the current VP into the mix.

The only issue is it only works on normal rectangular VP's, if the object would have been visible in the VP's bounding box then it's selected - even if the VP's border hides the object. But I guess that's a bit overkill.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: SSget help
« Reply #11 on: June 12, 2013, 07:50:04 AM »
Hello,
Quote
Exactly. Which means you'd need the coordinates of the VP (or cropped vectors if so), and also the layers which aren't VP-Frozen.

To the game...
Code: [Select]
(ssget "_C" '(-1e99 -1e99) '(1e99 1e99))
Would you mind elaborating on this?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: SSget help
« Reply #12 on: June 12, 2013, 08:00:15 AM »
Hello,
Quote
Exactly. Which means you'd need the coordinates of the VP (or cropped vectors if so), and also the layers which aren't VP-Frozen.

To the game...
Code: [Select]
(ssget "_C" '(-1e99 -1e99) '(1e99 1e99))
Would you mind elaborating on this?

Using the idea that ssget graphical selection modes will only select objects currently visible on screen.

bruno_vdh

  • Guest
Re: SSget help
« Reply #13 on: June 12, 2013, 08:18:20 AM »
Quote
The only issue is it only works on normal rectangular VP's, if the object would have been visible in the VP's bounding box then it's selected - even if the VP's border hides the object. But I guess that's a bit overkill.
Yes, the trick has its limitations, it was for the game

Quote
Would you mind elaborating on this?
I used this expression to amuse me in a code posted on the forum CADxp
http://cadxp.com/index.php?/topic/35882-modifier-temporairement-l%e2%80%99affichage-des-lignes-discontinues-en-continues/page__view__findpost__p__195201

Regards,

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SSget help
« Reply #14 on: June 12, 2013, 08:51:57 AM »
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 help
« Reply #15 on: June 12, 2013, 08:57:32 AM »
Hello,
Quote
Exactly. Which means you'd need the coordinates of the VP (or cropped vectors if so), and also the layers which aren't VP-Frozen.

To the game...
Code: [Select]
(ssget "_C" '(-1e99 -1e99) '(1e99 1e99))
Would you mind elaborating on this?

Using the idea that ssget graphical selection modes will only select objects currently visible on screen.
Right on. I thought as much, but wasn't 100%. Thanks.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SSget help
« Reply #16 on: June 12, 2013, 09:35:48 AM »
Food for thought.  8)
http://www.theswamp.org/index.php?topic=9461.msg129670#msg129670
Well then that code could be used to calculate the boundary of a CP selection. That would then probably do even the cropped VP's correctly.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.