using entsel and highlight object

Discussion in 'AutoCAD' started by tader, Oct 24, 2004.

  1. tader

    tader Guest

    hi, this is a lisp that checks two endpoints to see if they are @ the same point. But some lines are parallel or near parallel so it is difficult to see which line i have clicked on (where the break is). Is it possible to have the entity highlighted when it is clicked w/out changing too much of the code?

    TIA, Shawn.

    (defun c:ce (/ ent a b end1 ent1 a1 b1 end2)
    (setvar "cmdecho" 0)
    (setq str "Endpoints are Equal")
    (setq ent (entsel "\nPick line 1 (near endpoint)")
    a (cdr ent)
    b (car a)
    end1 (osnap b "endp")
    )
    (setq ent1 (entsel "\nPick line 2 (near endpoint)")
    a1 (cdr ent1)
    b1 (car a1)
    end2 (osnap b1 "endp")
    )
    (if
    (equal end1 end2)
    (prin1 str)
    (alert "Endpoints are Not Equal!!")
    )
    )
     
    tader, Oct 24, 2004
    #1
  2. tader

    James Allen Guest

    (redraw)

    See added lines below. You may also want to look it up in the help files
    for more information about the arguments.
    --
    James Allen
    Malicoat-Winslow Engineers, P.C.
    Columbia, MO

    point. But some lines are parallel or near parallel so it is difficult to
    see which line i have clicked on (where the break is). Is it possible to
    have the entity highlighted when it is clicked w/out changing too much of
    the code?
    (redraw (car ent) 3);<----------------Added Hightlight ent
    (redraw (car ent1) 3);<--------------Added Hightlight ent1
     
    James Allen, Oct 25, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.