| Author |
Message |
GTASteve
Guest
|
Posted:
Wed Jan 12, 2005 12:38 am Post subject:
entsel, fail, use fail-point for crossing/fence |
|
|
Hello all,
I want the LISP, to do similar to say, the ERASE command.
e.g.
ERASE [Enter]
{pickbox shown on screen, user can select a single object}
{if user clicks an empty space, the crossing/window option is auto-invoked}
For my scenario, I want something similar...
(setq usrPick (entsel "\nSelect Object: "))
;if this fails, I want the 'fail-point', so that I can use this point to start a fence...
;I know it seems weird, but there is a good reason for this behaviour... ;-)
Cheers,
Steve
|
|
| Back to top |
|
 |
T.Willey
Guest
|
Posted:
Wed Jan 12, 2005 12:57 am Post subject:
Re: entsel, fail, use fail-point for crossing/fence |
|
|
(setq Pt1 (cadr (grread 3)))
This should give you the point when entsel fails to select something.
Tim |
|
| Back to top |
|
 |
Jim Claypool
Guest
|
Posted:
Wed Jan 12, 2005 1:30 am Post subject:
Re: entsel, fail, use fail-point for crossing/fence |
|
|
Use (ssget ":S") instead. Just keep in mind that with a crossing window you
can select more than one object.
"GTASteve" <nospam@address.withheld> wrote in message
news:9575702.1105472326998.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | Hello all,
I want the LISP, to do similar to say, the ERASE command.
e.g.
ERASE [Enter]
{pickbox shown on screen, user can select a single object}
{if user clicks an empty space, the crossing/window option is
auto-invoked}
For my scenario, I want something similar...
(setq usrPick (entsel "\nSelect Object: "))
;if this fails, I want the 'fail-point', so that I can use this point to
start a fence...
;I know it seems weird, but there is a good reason for this behaviour...
;-)
Cheers,
Steve |
|
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Wed Jan 12, 2005 1:37 am Post subject:
Re: entsel, fail, use fail-point for crossing/fence |
|
|
Maybe this will help?
;Modified from Tanzillo's (SelectObjectOrWindow)
;Return: List, list returned by (entsel) or a list of two points
(defun SelectObjectOrPickPoints (msg / Res p2)
(if (not msg) (setq msg "\nSelect object/<first point>: "))
(setvar "errno" 0)
(if (setq Res (entsel msg))
Res
(if (and (eq 7 (getvar "errno"))
(setq Res (grread t))
(eq (car Res) 5)
(setq p2 (getpoint (cadr Res) "\nopposite corner: "))
)
(list (cadr Res) p2)
)
)
)
--
Autodesk Discussion Group Facilitator
"GTASteve" <nospam@address.withheld> wrote in message
news:9575702.1105472326998.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | Hello all,
I want the LISP, to do similar to say, the ERASE command.
e.g.
ERASE [Enter]
{pickbox shown on screen, user can select a single object}
{if user clicks an empty space, the crossing/window option is
auto-invoked}
For my scenario, I want something similar...
(setq usrPick (entsel "\nSelect Object: "))
;if this fails, I want the 'fail-point', so that I can use this point to
start a fence...
;I know it seems weird, but there is a good reason for this behaviour...
;-)
Cheers,
Steve |
|
|
| Back to top |
|
 |
Adesu
Guest
|
Posted:
Wed Jan 12, 2005 8:30 am Post subject:
Re: entsel, fail, use fail-point for crossing/fence |
|
|
Hi Steve,may be you can try my code
; eo is stand for erase object
; Design by Ade Suharna <mteybid@yuasabattery.co.id>
; 4 January 2005
; Program no.155/01/2005
; Edit by
(defun c:eo (/ ob ss)
(while
(setq ob (strcase (getstring T "\nENTER NAME OBJECT: ")))
(setq ss (ssget "x" (list (cons 0 ob))))
(command "_erase" ss "")
)
(princ)
)
GTASteve <nospam@address.withheld> wrote in message
news:9575702.1105472326998.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | Hello all,
I want the LISP, to do similar to say, the ERASE command.
e.g.
ERASE [Enter]
{pickbox shown on screen, user can select a single object}
{if user clicks an empty space, the crossing/window option is
auto-invoked}
For my scenario, I want something similar...
(setq usrPick (entsel "\nSelect Object: "))
;if this fails, I want the 'fail-point', so that I can use this point to
start a fence...
;I know it seems weird, but there is a good reason for this behaviour...
;-)
Cheers,
Steve |
|
|
| Back to top |
|
 |
|
|
|
|