Set endpoint of lwpolyline to hot grip

Discussion in 'AutoCAD' started by Alan Henderson @ A'cad Solutions, Oct 7, 2004.

  1. I am trying to write a routine to -
    find all lwpolylines in drawing
    zoom to start of 1st polyline
    set end vertex to grip hot
    allow user to move end point (without selection)
    then continue to next lwpolyline

    I have figured out how to do everything except set the end vertex as hot grip

    TIA, Alan
     
    Alan Henderson @ A'cad Solutions, Oct 7, 2004
    #1
  2. Alan Henderson @ A'cad Solutions

    John Uhden Guest

    Hi, Alan.

    I think Tony T. will tell you that you need ObjectArx to do such things. I
    personally know of no such other means.




    message I am trying to write a routine to -
    find all lwpolylines in drawing
    zoom to start of 1st polyline
    set end vertex to grip hot
    allow user to move end point (without selection)
    then continue to next lwpolyline

    I have figured out how to do everything except set the end vertex as hot grip

    TIA, Alan
     
    John Uhden, Oct 8, 2004
    #2
  3. Alan Henderson @ A'cad Solutions

    mataeux Guest

    ;;; no transform implemented

    (setq
    elist (entget(car(entsel"select LWPOLYLINE: ")))
    head (reverse(cdr(member(assoc 10 elist)(reverse elist))))
    foot (cdr(member(assoc 10 elist) elist))
    done ()
    )

    (while (not done)
    (setq input (grread T)
    device (car input)
    value (cadr input)
    )
    (cond
    ((= device 5) ;;; drag first vertex to cursor location
    (entmod(append head (list(cons 10 value)) foot))
    )
    ((= device 3) ;;; click occured, use new posish
    (setq elist (entmod(append head(list(cons 10 value))foot))
    done T
    )
    )
    ((= device 2) ;;; keyboard press, move on with no change
    (entmod elist)(setq done T)
    )
    )
    )

    ;;; within this framework you can add the look of grips
    ;;; by drawing glyphs and simulate the function of grips
    ;;; by sensing and snapping to other vertices
     
    mataeux, Oct 8, 2004
    #3
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.