• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    *van Eeten, John

    Delete entity?

    196 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
    Please use plain text.
    *McSwain, R.K.

    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
    >
    >
    Please use plain text.
    *van Eeten, John

    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
    > >
    > >
    >
    >
    Please use plain text.