Why don't this assign the entity list to variable "LLIST"?
--
Rodney D. Lester
Systems Manager
---------------------------
GMS, Inc.
Acworth, GA
---------------------------
LLIST (entget (car LINE))
Devin Currie
dscu...@canuck.com
Rodney D. Lester wrote in message <6l97nb$po...@adesknews2.autodesk.com>...
Rodney,
Try this:
(Defun BD:GETINPUT ()
(while (= (setq line (car (entsel "Select Line: "))) nil))
(setq llist (entget line))
)
Hope this helps.
On Fri, 5 Jun 1998 12:49:31 -0400, "Rodney D. Lester" <rle...@gardnermetal.com>
wrote this unique note:
>(defun BD:GETINPUT ()
> (setq LINE (entsel "Select Line: "))
> (while (= LINE NIL)
> (setq
> LINE (entsel "Select Line: ")
> LLIST (entget LINE)
> ) ;_ end of setq
> ) ;_ close while
>) ;_ end of defun
>
>Why don't this assign the entity list to variable "LLIST"?
Jeff Foster
Owner, CADShack
http://www.cadshack.com
CAD Specialist, McKim & Creed
http://www.mckimcreed.com
Cabot
Rodney D. Lester wrote:
>
> (defun BD:GETINPUT ()
> (setq LINE (entsel "Select Line: "))
> (while (= LINE NIL)
> (setq
> LINE (entsel "Select Line: ")
> LLIST (entget LINE)
> ) ;_ end of setq
> ) ;_ close while
> ) ;_ end of defun
>
> Why don't this assign the entity list to variable "LLIST"?
>
(setq LINE (entsel "Select Line: "))
If you select an object, "LINE" will contain an list of an Entity Name
and the selction point.
(while (= LINE NIL)
since "LINE" contains something which is not NIL, the WHILE loop
will execute exactly zero times. Therefore, the (entget ...) never gets
executed.
As someone else pointed out, the appropriate code to feed into (entget
...) is:
(entget (car LINE))
jrf
--
Rodney D. Lester
Systems Manager
---------------------------
GMS, Inc.
Acworth, GA
---------------------------
Rodney D. Lester wrote in message <6l97nb$po...@adesknews2.autodesk.com>...
>Rodney,
>
>Try this:
>
>(Defun BD:GETINPUT ()
> (while (= (setq line (car (entsel "Select Line: "))) nil))
> (setq llist (entget line))
>)
>
>Hope this helps.
>
>On Fri, 5 Jun 1998 12:49:31 -0400, "Rodney D. Lester" <rle...@gardnermetal.com>
>wrote this unique note:
>
>>(defun BD:GETINPUT ()
>> (setq LINE (entsel "Select Line: "))
>> (while (= LINE NIL)
>> (setq
>> LINE (entsel "Select Line: ")
>> LLIST (entget LINE)
>> ) ;_ end of setq
>> ) ;_ close while
>>) ;_ end of defun
>>
>>Why don't this assign the entity list to variable "LLIST"?
Hi Rodney,
you may have to distinguish between a faulty pick and RETURN pressed.
(defun getinput (/ en)
(princ "\nSelect Object/<Exit>: ")
(while (not (progn (initget " ")(setq en (entsel "")))))
(if (/= "" en) (car en) 'nil)
)
This routine loops until an object is selected or RETURN is pressed.
If additional Keywords are needed, i.e. "Next":
(defun getinput (/ en)
(princ "\nSelect Object/Next/<Exit>: ")
(while (not (progn (initget "Next ,")(setq en (entsel "")))))
(if (/= "" en)
(if (listp en) (car en) en)
'nil
)
)
Cheers,
Christoph
--
*********************************************
Christoph Candido
E-Mail: h854...@edv1.boku.ac.at
University of Agricultural Sciences
Vienna, Austria
*********************************************