Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clear the "Previous" selection set

18 REPLIES 18
Reply
Message 1 of 19
Anonymous
329 Views, 18 Replies

Clear the "Previous" selection set

I thought this was posted here, but I can't seem to find any trace.
Is there a way to clear the previous selection set without using the (command) function?

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
18 REPLIES 18
Message 2 of 19
Anonymous
in reply to: Anonymous

Hi John,
I belive that solution I saw was to create a dummy point, then entdel.


--
-Jason

Member of the Autodesk Discussion Forum Moderator Program

"John Uhden" wrote in message
news:BE6677E7C9AAFA4D5CB06228D7BE0C90@in.WebX.maYIadrTaRb...
> I thought this was posted here, but I can't seem to find any trace.
> Is there a way to clear the previous selection set without using the
(command) function?
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> [ mailto:juhden@cadlantic.com ]
> [ http://www.cadlantic.com ]
> 2 Village Road
> Sea Girt, NJ 08750
> Tel. 732-974-1711
>
Message 3 of 19
Anonymous
in reply to: Anonymous

Hmmm. guess I should have tried that first....

--
-Jason

Member of the Autodesk Discussion Forum Moderator Program
Message 4 of 19
Anonymous
in reply to: Anonymous

You were close:

Command: select
Select objects: Specify opposite corner: 3 found
Select objects:
Command: (command "._point" "0,0" "._erase" (entlast) "")
._point
Current point modes: PDMODE=0 PDSIZE=0.0000
Specify a point: 0,0
Command: ._erase
Select objects: 1 found
Select objects:
Command: nil
Command: (ssget "P")
nil

I found that above tidbit in a post from Jim Claypool.

--
R. Robert Bell, MCSE
www.AcadX.com


"Jason Piercey" wrote in message
news:3CC8BE3EC78C46DC5B7117FFAF1A1475@in.WebX.maYIadrTaRb...
> Hmmm. guess I should have tried that first....
>
> --
> -Jason
>
> Member of the Autodesk Discussion Forum Moderator Program
>
>
>
Message 5 of 19
Anonymous
in reply to: Anonymous

John:

> Is there a way to clear the previous selection set without
> using the (command) function?

I believe any call to (ssget) sets the previous selection to the result.
Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com
Message 6 of 19
Anonymous
in reply to: Anonymous

Beautiful Owen!

Command: select
Select objects: Specify opposite corner: 3 found
Select objects:
Command: (sssetfirst nil nil)
(nil nil)
Command: (ssget "I")
nil

--
R. Robert Bell, MCSE
www.AcadX.com


"Owen Wengerd" wrote in message
news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> John:
>
> > Is there a way to clear the previous selection set without
> > using the (command) function?
>
> I believe any call to (ssget) sets the previous selection to the result.
> Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> --
> Owen Wengerd
> President, ManuSoft ==> http://www.manusoft.com
> VP Americas, CADLock, Inc. ==> http://www.cadlock.com
>
Message 7 of 19
Anonymous
in reply to: Anonymous

You didn't go far enough...

Command: select
Select objects: Specify opposite corner: 3 found
Select objects:
Command: (sssetfirst nil nil)
(nil nil)
Command: (setq ss (ssget "I"))
nil
Command: select
Select objects: p
3 found
Select objects: *Cancel*

I know that (command "_.erase") etc. will do the trick, but the challenge is to NOT use (command).

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711


"R. Robert Bell" wrote in message news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> Beautiful Owen!
>
> Command: select
> Select objects: Specify opposite corner: 3 found
> Select objects:
> Command: (sssetfirst nil nil)
> (nil nil)
> Command: (ssget "I")
> nil
>
> --
> R. Robert Bell, MCSE
> www.AcadX.com
>
>
> "Owen Wengerd" wrote in message
> news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > John:
> >
> > > Is there a way to clear the previous selection set without
> > > using the (command) function?
> >
> > I believe any call to (ssget) sets the previous selection to the result.
> > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > --
> > Owen Wengerd
> > President, ManuSoft ==> http://www.manusoft.com
> > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> >
>
>
Message 8 of 19
Anonymous
in reply to: Anonymous

😉

I would have thought this would work, and indeed ActiveSelectionSet.Count is
0, but an (ssget "P") returns the old previous...

(vla-Clear (vla-Get-ActiveSelectionSet
(vla-Get-ActiveDocument (vlax-Get-Acad-Object))))

--
R. Robert Bell, MCSE
www.AcadX.com


"John Uhden" wrote in message
news:7625913686310A4E224A64391BC41F65@in.WebX.maYIadrTaRb...
> You didn't go far enough...
>
> Command: select
> Select objects: Specify opposite corner: 3 found
> Select objects:
> Command: (sssetfirst nil nil)
> (nil nil)
> Command: (setq ss (ssget "I"))
> nil
> Command: select
> Select objects: p
> 3 found
> Select objects: *Cancel*
>
> I know that (command "_.erase") etc. will do the trick, but the challenge
is to NOT use (command).
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> [ mailto:juhden@cadlantic.com ]
> [ http://www.cadlantic.com ]
> 2 Village Road
> Sea Girt, NJ 08750
> Tel. 732-974-1711
>
>
> "R. Robert Bell" wrote in message
news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> > Beautiful Owen!
> >
> > Command: select
> > Select objects: Specify opposite corner: 3 found
> > Select objects:
> > Command: (sssetfirst nil nil)
> > (nil nil)
> > Command: (ssget "I")
> > nil
> >
> > --
> > R. Robert Bell, MCSE
> > www.AcadX.com
> >
> >
> > "Owen Wengerd" wrote in message
> > news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > > John:
> > >
> > > > Is there a way to clear the previous selection set without
> > > > using the (command) function?
> > >
> > > I believe any call to (ssget) sets the previous selection to the
result.
> > > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > > --
> > > Owen Wengerd
> > > President, ManuSoft ==> http://www.manusoft.com
> > > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> > >
> >
> >
Message 9 of 19
Anonymous
in reply to: Anonymous

What is the big hang up on using (command) to accomplish a task that
otherwise might take forever to figure out?
Am I missing something? I like challenges as much as anybody, but sometimes
I see it here as an obsession.

"John Uhden" wrote in message
news:7625913686310A4E224A64391BC41F65@in.WebX.maYIadrTaRb...
> You didn't go far enough...
>
> Command: select
> Select objects: Specify opposite corner: 3 found
> Select objects:
> Command: (sssetfirst nil nil)
> (nil nil)
> Command: (setq ss (ssget "I"))
> nil
> Command: select
> Select objects: p
> 3 found
> Select objects: *Cancel*
>
> I know that (command "_.erase") etc. will do the trick, but the challenge
is to NOT use (command).
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> [ mailto:juhden@cadlantic.com ]
> [ http://www.cadlantic.com ]
> 2 Village Road
> Sea Girt, NJ 08750
> Tel. 732-974-1711
>
>
> "R. Robert Bell" wrote in message
news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> > Beautiful Owen!
> >
> > Command: select
> > Select objects: Specify opposite corner: 3 found
> > Select objects:
> > Command: (sssetfirst nil nil)
> > (nil nil)
> > Command: (ssget "I")
> > nil
> >
> > --
> > R. Robert Bell, MCSE
> > www.AcadX.com
> >
> >
> > "Owen Wengerd" wrote in message
> > news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > > John:
> > >
> > > > Is there a way to clear the previous selection set without
> > > > using the (command) function?
> > >
> > > I believe any call to (ssget) sets the previous selection to the
result.
> > > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > > --
> > > Owen Wengerd
> > > President, ManuSoft ==> http://www.manusoft.com
> > > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> > >
> >
> >
Message 10 of 19
Anonymous
in reply to: Anonymous

Maybe for the use with a reactor, where (command) is not allowed? Just
guessing....

--
-Jason

Member of the Autodesk Discussion Forum Moderator Program


> What is the big hang up on using (command) to accomplish a task that
> otherwise might take forever to figure out?
Message 11 of 19
Anonymous
in reply to: Anonymous

Sorry I didn't explain. The reason is for transparency.

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711

"Jim Claypool" wrote in message news:6A8A11E7DD0A8414EDF01189A2F93E52@in.WebX.maYIadrTaRb...
> What is the big hang up on using (command) to accomplish a task that
> otherwise might take forever to figure out?
> Am I missing something? I like challenges as much as anybody, but sometimes
> I see it here as an obsession.
>
> "John Uhden" wrote in message
> news:7625913686310A4E224A64391BC41F65@in.WebX.maYIadrTaRb...
> > You didn't go far enough...
> >
> > Command: select
> > Select objects: Specify opposite corner: 3 found
> > Select objects:
> > Command: (sssetfirst nil nil)
> > (nil nil)
> > Command: (setq ss (ssget "I"))
> > nil
> > Command: select
> > Select objects: p
> > 3 found
> > Select objects: *Cancel*
> >
> > I know that (command "_.erase") etc. will do the trick, but the challenge
> is to NOT use (command).
> >
> > --
> > John Uhden, Cadlantic/formerly CADvantage
> > [ mailto:juhden@cadlantic.com ]
> > [ http://www.cadlantic.com ]
> > 2 Village Road
> > Sea Girt, NJ 08750
> > Tel. 732-974-1711
> >
> >
> > "R. Robert Bell" wrote in message
> news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> > > Beautiful Owen!
> > >
> > > Command: select
> > > Select objects: Specify opposite corner: 3 found
> > > Select objects:
> > > Command: (sssetfirst nil nil)
> > > (nil nil)
> > > Command: (ssget "I")
> > > nil
> > >
> > > --
> > > R. Robert Bell, MCSE
> > > www.AcadX.com
> > >
> > >
> > > "Owen Wengerd" wrote in message
> > > news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > > > John:
> > > >
> > > > > Is there a way to clear the previous selection set without
> > > > > using the (command) function?
> > > >
> > > > I believe any call to (ssget) sets the previous selection to the
> result.
> > > > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > > > --
> > > > Owen Wengerd
> > > > President, ManuSoft ==> http://www.manusoft.com
> > > > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> > > >
> > >
> > >
>
>
Message 12 of 19
Anonymous
in reply to: Anonymous

(command ".point" "0,0")(command ".erase" (entlast) "")(princ)
is transparent if cmdecho is 0

"John Uhden" wrote in message
news:757EE0CC1F122D582382DF4E8431B34B@in.WebX.maYIadrTaRb...
> Sorry I didn't explain. The reason is for transparency.
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> [ mailto:juhden@cadlantic.com ]
> [ http://www.cadlantic.com ]
> 2 Village Road
> Sea Girt, NJ 08750
> Tel. 732-974-1711
>
> "Jim Claypool" wrote in message
news:6A8A11E7DD0A8414EDF01189A2F93E52@in.WebX.maYIadrTaRb...
> > What is the big hang up on using (command) to accomplish a task that
> > otherwise might take forever to figure out?
> > Am I missing something? I like challenges as much as anybody, but
sometimes
> > I see it here as an obsession.
> >
> > "John Uhden" wrote in message
> > news:7625913686310A4E224A64391BC41F65@in.WebX.maYIadrTaRb...
> > > You didn't go far enough...
> > >
> > > Command: select
> > > Select objects: Specify opposite corner: 3 found
> > > Select objects:
> > > Command: (sssetfirst nil nil)
> > > (nil nil)
> > > Command: (setq ss (ssget "I"))
> > > nil
> > > Command: select
> > > Select objects: p
> > > 3 found
> > > Select objects: *Cancel*
> > >
> > > I know that (command "_.erase") etc. will do the trick, but the
challenge
> > is to NOT use (command).
> > >
> > > --
> > > John Uhden, Cadlantic/formerly CADvantage
> > > [ mailto:juhden@cadlantic.com ]
> > > [ http://www.cadlantic.com ]
> > > 2 Village Road
> > > Sea Girt, NJ 08750
> > > Tel. 732-974-1711
> > >
> > >
> > > "R. Robert Bell" wrote in message
> > news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> > > > Beautiful Owen!
> > > >
> > > > Command: select
> > > > Select objects: Specify opposite corner: 3 found
> > > > Select objects:
> > > > Command: (sssetfirst nil nil)
> > > > (nil nil)
> > > > Command: (ssget "I")
> > > > nil
> > > >
> > > > --
> > > > R. Robert Bell, MCSE
> > > > www.AcadX.com
> > > >
> > > >
> > > > "Owen Wengerd" wrote in message
> > > > news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > > > > John:
> > > > >
> > > > > > Is there a way to clear the previous selection set without
> > > > > > using the (command) function?
> > > > >
> > > > > I believe any call to (ssget) sets the previous selection to the
> > result.
> > > > > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > > > > --
> > > > > Owen Wengerd
> > > > > President, ManuSoft ==> http://www.manusoft.com
> > > > > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> > > > >
> > > >
> > > >
> >
> >
Message 13 of 19
Anonymous
in reply to: Anonymous

Command: Erase
Select object: '(noP)



--
R. Robert Bell, MCSE
www.AcadX.com


"Jim Claypool" wrote in message
news:67A7208BC75834E1ED6401D71C4E3BED@in.WebX.maYIadrTaRb...
> (command ".point" "0,0")(command ".erase" (entlast) "")(princ)
> is transparent if cmdecho is 0
>
> "John Uhden" wrote in message
> news:757EE0CC1F122D582382DF4E8431B34B@in.WebX.maYIadrTaRb...
> > Sorry I didn't explain. The reason is for transparency.
> >
> > --
> > John Uhden, Cadlantic/formerly CADvantage
> > [ mailto:juhden@cadlantic.com ]
> > [ http://www.cadlantic.com ]
> > 2 Village Road
> > Sea Girt, NJ 08750
> > Tel. 732-974-1711
> >
> > "Jim Claypool" wrote in message
> news:6A8A11E7DD0A8414EDF01189A2F93E52@in.WebX.maYIadrTaRb...
> > > What is the big hang up on using (command) to accomplish a task that
> > > otherwise might take forever to figure out?
> > > Am I missing something? I like challenges as much as anybody, but
> sometimes
> > > I see it here as an obsession.
> > >
> > > "John Uhden" wrote in message
> > > news:7625913686310A4E224A64391BC41F65@in.WebX.maYIadrTaRb...
> > > > You didn't go far enough...
> > > >
> > > > Command: select
> > > > Select objects: Specify opposite corner: 3 found
> > > > Select objects:
> > > > Command: (sssetfirst nil nil)
> > > > (nil nil)
> > > > Command: (setq ss (ssget "I"))
> > > > nil
> > > > Command: select
> > > > Select objects: p
> > > > 3 found
> > > > Select objects: *Cancel*
> > > >
> > > > I know that (command "_.erase") etc. will do the trick, but the
> challenge
> > > is to NOT use (command).
> > > >
> > > > --
> > > > John Uhden, Cadlantic/formerly CADvantage
> > > > [ mailto:juhden@cadlantic.com ]
> > > > [ http://www.cadlantic.com ]
> > > > 2 Village Road
> > > > Sea Girt, NJ 08750
> > > > Tel. 732-974-1711
> > > >
> > > >
> > > > "R. Robert Bell" wrote in message
> > > news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> > > > > Beautiful Owen!
> > > > >
> > > > > Command: select
> > > > > Select objects: Specify opposite corner: 3 found
> > > > > Select objects:
> > > > > Command: (sssetfirst nil nil)
> > > > > (nil nil)
> > > > > Command: (ssget "I")
> > > > > nil
> > > > >
> > > > > --
> > > > > R. Robert Bell, MCSE
> > > > > www.AcadX.com
> > > > >
> > > > >
> > > > > "Owen Wengerd" wrote in message
> > > > > news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > > > > > John:
> > > > > >
> > > > > > > Is there a way to clear the previous selection set without
> > > > > > > using the (command) function?
> > > > > >
> > > > > > I believe any call to (ssget) sets the previous selection to
the
> > > result.
> > > > > > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > > > > > --
> > > > > > Owen Wengerd
> > > > > > President, ManuSoft ==> http://www.manusoft.com
> > > > > > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> > > > > >
> > > > >
> > > > >
> > >
> > >
>
>
Message 14 of 19
Anonymous
in reply to: Anonymous

How does turning off CmdEcho make it transparent?

--
-Jason

Member of the Autodesk Discussion Forum Moderator Program


> (command ".point" "0,0")(command ".erase" (entlast) "")(princ)
> is transparent if cmdecho is 0
Message 15 of 19
Anonymous
in reply to: Anonymous

This works, but still shows a previous selection set even though there is
none:

(if (entmake (entget (ssname (ssget "L") 0)))
(entdel (ssname (ssget "L") 0))
)

Command: (if (entmake (entget (ssname (ssget "L") 0)))
(_> (entdel (ssname (ssget "L") 0))
(_> )


Command: _select

Select objects: _p 1 found

Select objects:

Command:
--

Regards,
Eric S.
A2k/W2k
Message 16 of 19
Anonymous
in reply to: Anonymous

Robert:
After stumbling around, I tripped over the Express Tools' (acet-ss-clear-prev) function which does the trick. By testing, I found that it's in the file Aecutil.fas but unfortunately it's not transparent. In fact it's using the good ol' make/erase method. Observe...

Enter new value for CMDECHO <1>:
Command: (acet-ss-clear-prev)
_.select
Select objects: 1 found
Select objects: 1 found, 1 total
1 was not in current space.
Select objects:
Command: _.undo Enter the number of operations to undo or
[Auto/Control/BEgin/End/Mark/Back] <1>: 1 .SELECT GROUP
Command: nil

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711


"R. Robert Bell" wrote in message news:71457C465FBC3EAF30B556F4E5421701@in.WebX.maYIadrTaRb...
> Command: Erase
> Select object: '(noP)
>
>
>
> --
> R. Robert Bell, MCSE
> www.AcadX.com
>
>
> "Jim Claypool" wrote in message
> news:67A7208BC75834E1ED6401D71C4E3BED@in.WebX.maYIadrTaRb...
> > (command ".point" "0,0")(command ".erase" (entlast) "")(princ)
> > is transparent if cmdecho is 0
> >
> > "John Uhden" wrote in message
> > news:757EE0CC1F122D582382DF4E8431B34B@in.WebX.maYIadrTaRb...
> > > Sorry I didn't explain. The reason is for transparency.
> > >
> > > --
> > > John Uhden, Cadlantic/formerly CADvantage
> > > [ mailto:juhden@cadlantic.com ]
> > > [ http://www.cadlantic.com ]
> > > 2 Village Road
> > > Sea Girt, NJ 08750
> > > Tel. 732-974-1711
> > >
> > > "Jim Claypool" wrote in message
> > news:6A8A11E7DD0A8414EDF01189A2F93E52@in.WebX.maYIadrTaRb...
> > > > What is the big hang up on using (command) to accomplish a task that
> > > > otherwise might take forever to figure out?
> > > > Am I missing something? I like challenges as much as anybody, but
> > sometimes
> > > > I see it here as an obsession.
> > > >
> > > > "John Uhden" wrote in message
> > > > news:7625913686310A4E224A64391BC41F65@in.WebX.maYIadrTaRb...
> > > > > You didn't go far enough...
> > > > >
> > > > > Command: select
> > > > > Select objects: Specify opposite corner: 3 found
> > > > > Select objects:
> > > > > Command: (sssetfirst nil nil)
> > > > > (nil nil)
> > > > > Command: (setq ss (ssget "I"))
> > > > > nil
> > > > > Command: select
> > > > > Select objects: p
> > > > > 3 found
> > > > > Select objects: *Cancel*
> > > > >
> > > > > I know that (command "_.erase") etc. will do the trick, but the
> > challenge
> > > > is to NOT use (command).
> > > > >
> > > > > --
> > > > > John Uhden, Cadlantic/formerly CADvantage
> > > > > [ mailto:juhden@cadlantic.com ]
> > > > > [ http://www.cadlantic.com ]
> > > > > 2 Village Road
> > > > > Sea Girt, NJ 08750
> > > > > Tel. 732-974-1711
> > > > >
> > > > >
> > > > > "R. Robert Bell" wrote in message
> > > > news:5BB3F6FC814A07CE382394DA3B5AC069@in.WebX.maYIadrTaRb...
> > > > > > Beautiful Owen!
> > > > > >
> > > > > > Command: select
> > > > > > Select objects: Specify opposite corner: 3 found
> > > > > > Select objects:
> > > > > > Command: (sssetfirst nil nil)
> > > > > > (nil nil)
> > > > > > Command: (ssget "I")
> > > > > > nil
> > > > > >
> > > > > > --
> > > > > > R. Robert Bell, MCSE
> > > > > > www.AcadX.com
> > > > > >
> > > > > >
> > > > > > "Owen Wengerd" wrote in message
> > > > > > news:22CA0466C61C87C240623B00AD2D13A5@in.WebX.maYIadrTaRb...
> > > > > > > John:
> > > > > > >
> > > > > > > > Is there a way to clear the previous selection set without
> > > > > > > > using the (command) function?
> > > > > > >
> > > > > > > I believe any call to (ssget) sets the previous selection to
> the
> > > > result.
> > > > > > > Judicious use of (sssetfirst) and (ssget "I") might work. 🙂
> > > > > > > --
> > > > > > > Owen Wengerd
> > > > > > > President, ManuSoft ==> http://www.manusoft.com
> > > > > > > VP Americas, CADLock, Inc. ==> http://www.cadlock.com
> > > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >
>
>
Message 17 of 19
Anonymous
in reply to: Anonymous

I had stumbled on that kind of method too. With locked layer checking, that's the best I think we're gonna do. Thanks much, Eric.

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711

"Eric Schneider" wrote in message news:4121AA0DDF961E55E279C97A116FDE1E@in.WebX.maYIadrTaRb...
> This works, but still shows a previous selection set even though there is
> none:
>
> (if (entmake (entget (ssname (ssget "L") 0)))
> (entdel (ssname (ssget "L") 0))
> )
>
> Command: (if (entmake (entget (ssname (ssget "L") 0)))
> (_> (entdel (ssname (ssget "L") 0))
> (_> )
>
>
> Command: _select
>
> Select objects: _p 1 found
>
> Select objects:
>
> Command:
> --
>
> Regards,
> Eric S.
> A2k/W2k
>
>
Message 18 of 19
Anonymous
in reply to: Anonymous

Adding the locked layer checking, here's the deal. Feel free to make it better. Thank you all for the help.

(defun @cv_ss_clear ( / dummy layer flag flag!)
(setq dummy (entmakex '((0 . "POINT")(8 . "0")(10 0 0 0)(60 . 1)))
layer (entget (tblobjname "layer" "0"))
flag (assoc 70 layer)
flag! (cons 70 (boole 2 (cdr flag) 4))
)
(entmod (subst flag! flag layer))
(entdel (ssname (ssget "X" '((0 . "POINT")(8 . "0")(10 0 0 0)(60 . 1))) 0))
(entmod (subst flag flag! layer))
(gc)
)

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711


"Eric Schneider" wrote in message news:4121AA0DDF961E55E279C97A116FDE1E@in.WebX.maYIadrTaRb...
> This works, but still shows a previous selection set even though there is
> none:
>
> (if (entmake (entget (ssname (ssget "L") 0)))
> (entdel (ssname (ssget "L") 0))
> )
>
> Command: (if (entmake (entget (ssname (ssget "L") 0)))
> (_> (entdel (ssname (ssget "L") 0))
> (_> )
>
>
> Command: _select
>
> Select objects: _p 1 found
>
> Select objects:
>
> Command:
> --
>
> Regards,
> Eric S.
> A2k/W2k
>
>
Message 19 of 19
Anonymous
in reply to: Anonymous

John:

> You didn't go far enough...

Yup, it looks like (ssget) only sets the previous set if it actually
returns something. Bummer. 😞
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost