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

Delete entity?

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
1591 Views, 2 Replies

Delete entity?

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
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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
>
>
Message 3 of 3
Anonymous
in reply to: Anonymous

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
> >
> >
>
>

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

Post to forums  

Autodesk Design & Make Report

”Boost