Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*van Eeten, John
Post 1 of 3

Delete entity?

389 Views, 2 Replies
06-02-2002 05:45 PM
Hi All,

If i have this program to make a polyline out of a line:

(defun c:test ( / )
(setq ent (entsel "Click splintered pline: "))
(setq ent1 (entget (car ent)))
(setq pointstart (cdr (assoc 10 ent1)))
(setq pointend (cdr (assoc 11 ent1)))
(command "pline" pointstart pointend "")
(entdel ent1)
(princ)
)

with the (entdel ent1) it goes wrong. I tried several ways but I can't make
it work to delete the selected line.
How can I do this?

Thanks in advance,

John van Eeten
*McSwain, R.K.
Post 2 of 3

Re: Delete entity?

06-02-2002 07:45 PM in reply to: *van Eeten, John
The (entdel) function expects an entity name, you
are passing it an entity list.

Change (entdel ent1) to (entdel (car ent))

"John van Eeten"
wrote in
message
news:3327003C63583A34718F852595F2E17A@in.WebX.maYI
adrTaRb...
> Hi All,
>
> If i have this program to make a polyline out of
a line:
>
> (defun c:test ( / )
> (setq ent (entsel "Click splintered pline: "))
> (setq ent1 (entget (car ent)))
> (setq pointstart (cdr (assoc 10 ent1)))
> (setq pointend (cdr (assoc 11 ent1)))
> (command "pline" pointstart pointend "")
> (entdel ent1)
> (princ)
> )
>
> with the (entdel ent1) it goes wrong. I tried
several ways but I can't make
> it work to delete the selected line.
> How can I do this?
>
> Thanks in advance,
>
> John van Eeten
>
>
*van Eeten, John
Post 3 of 3

Re:

06-03-2002 04:04 PM in reply to: *van Eeten, John
Thanks!
John

"R.K. McSwain" schreef in bericht
news:63FC76563578E16A2BEAD587B0BB28D6@in.WebX.maYIadrTaRb...
> The (entdel) function expects an entity name, you
> are passing it an entity list.
>
> Change (entdel ent1) to (entdel (car ent))
>
> "John van Eeten"
> wrote in
> message
> news:3327003C63583A34718F852595F2E17A@in.WebX.maYI
> adrTaRb...
> > Hi All,
> >
> > If i have this program to make a polyline out of
> a line:
> >
> > (defun c:test ( / )
> > (setq ent (entsel "Click splintered pline: "))
> > (setq ent1 (entget (car ent)))
> > (setq pointstart (cdr (assoc 10 ent1)))
> > (setq pointend (cdr (assoc 11 ent1)))
> > (command "pline" pointstart pointend "")
> > (entdel ent1)
> > (princ)
> > )
> >
> > with the (entdel ent1) it goes wrong. I tried
> several ways but I can't make
> > it work to delete the selected line.
> > How can I do this?
> >
> > Thanks in advance,
> >
> > John van Eeten
> >
> >
>
>
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!