acet-ss-drag-move problem

Discussion in 'AutoCAD' started by C Witt, Nov 25, 2004.

  1. C Witt

    C Witt Guest

    I must have some variable screwed up because this command will not
    work.. (not correctly anyway)..

    when I use the lisp command (acet-ss-drag-move sset pt1 highlight 0)
    and enter in a distance of "10" (with ortho on), the resulting point
    (relative to pt1) is NEVER a distance of "10".. i've seen values ranging
    from 0.15 -> 9.889 (and only 50% of the time is it in the direction the
    cursor was pointing).

    I'm at a loss here, this command is what i need.. but I'm hooped so long
    as it refuses to work as expected (and as it was designed to work?).

    I hope someone can help (or at least duplicate the problem, so I'm not
    alone).
     
    C Witt, Nov 25, 2004
    #1
  2. C Witt

    C Witt Guest

    most don't have 2K5?.. the ones that matter do.. (it has been out for a
    while now).
     
    C Witt, Nov 25, 2004
    #2
  3. C Witt

    Doug Broad Guest

    Note also that the return value when using DDE depends on the
    lastpoint system variable.
     
    Doug Broad, Nov 25, 2004
    #3
  4. C Witt

    C Witt Guest

    odd.. when I make use of that var.. the lisp works.. thank you.
     
    C Witt, Nov 25, 2004
    #4
  5. C Witt

    C Witt Guest

    hmm.. well it work the first time.. damn...


    do you know of another method of "showing" the object beging moved?
     
    C Witt, Nov 25, 2004
    #5
  6. C Witt

    LUCAS Guest

    ;;By LUCAS (???)
    ;;(SSDRAG_LAI (ssget) (getpoint "\nBasic point: ") "_.MOVE")
    ;;Only for "MOVE" command
    (defun SSDRAG_LAI (SS PT DRAGCOMMAND / CMDECHO)
    (if (and SS
    (or (= (type SS) 'PICKSET) (= (type SS) 'ENAME))
    PT
    (= (type PT) 'list)
    )
    (progn (setq CMDECHO (getvar "cmdecho"))
    (setvar "cmdecho" 0)
    (prompt "\nSecond point: ")
    (command DRAGCOMMAND SS "" PT PAUSE)
    (command "_.undo" "1")
    (setvar "cmdecho" CMDECHO)
    (if (equal PT (getvar "lastpoint"))
    NIL
    (getvar "lastpoint")
    )
    )
    )
    )
     
    LUCAS, Nov 26, 2004
    #6
  7. C Witt

    CAB2k Guest

    Why not use the MOVE command?

    (prompt "\nSelect objects to move.")
    (setq ss (ssget))
    (setq p1 (getpoint "\nBase point of move: "))
    (command "_.MOVE" ss "" p1 pause)
    (if (equal p1 (getvar "lastpoint") 0.0001)
    (alert "Objects were not moved")
    )
     
    CAB2k, Nov 27, 2004
    #7
  8. C Witt

    C Witt Guest

    I'm adding options and a new functionality to the existing move
    command.. and thus any data I feed to the move command must be aquired
    prior to calling the command, not during.
     
    C Witt, Nov 29, 2004
    #8
  9. C Witt

    CAB2k Guest

    Well the base point and selection set are acquired before the actual move command.
    Only the destination point is acquired during the move command.
    If that too is passed to the move command then you will not see the drag.
    Could you be more specific as to why the code does not meet your needs?
     
    CAB2k, Nov 29, 2004
    #9
  10. C Witt

    C Witt Guest

    "then you will not see the drag".. that would be why i was trying to use
    the acet-ss-drag-move function.. (and if you read the OP, you will see
    that it won't work they way it "should").

    as to why the code you posted does not meet my "needs" .. you said it
    yourself.."the destination point is acquired during the move command"
    and that is exactly what i don't want to happen. my code (that i
    irrelevant here) acquires this point while allowing the user more
    options (inter office stuff) and is then passed to the core move command.
     
    C Witt, Dec 1, 2004
    #10
  11. C Witt

    CAB2k Guest

    Perhaps this is what you are after?

    (prompt "\nSelect objects to move.")
    (setq ss (ssget))
    (setq p1 (getpoint "\nBase point of move: "))
    (setq p2 (getpoint p1 "\nDestination point of move: "))
    (setq step (/ (distance p1 p2) 20)) ; 20 steps
    (repeat 20
    (command "_.MOVE" ss "" p1 (setq p1 (polar p1 (angle p1 p2) step)))
    (repeat 10 (princ))
    )
     
    CAB2k, Dec 3, 2004
    #11
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.