(if (eq (getvar 'CVPORT) 1)
(cons 410 (getvar 'CTAB))
'(410 . "Model")
)
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?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?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.
... and also the layers which aren't VP-Frozen.Using (ssget "_A") solves this. Plus there is no need for a ctab filter.
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.
(ssget "_C" '(-1e99 -1e99) '(1e99 1e99))
To the game...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.Code: [Select](ssget "_C" '(-1e99 -1e99) '(1e99 1e99))
Hello,Would you mind elaborating on this?QuoteExactly. 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))
Hello,Would you mind elaborating on this?QuoteExactly. 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))
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
Would you mind elaborating on this?I used this expression to amuse me in a code posted on the forum CADxp
Right on. I thought as much, but wasn't 100%. Thanks.Hello,Would you mind elaborating on this?QuoteExactly. 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))
Using the idea that ssget graphical selection modes will only select objects currently visible on screen.
Food for thought. 8)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.
http://www.theswamp.org/index.php?topic=9461.msg129670#msg129670