grread I think???

Discussion in 'AutoCAD' started by jojo, Nov 22, 2004.

  1. jojo

    jojo Guest

    I am trying to do two things with one pick. I want to select an object, and then use the point that I picked to select the object in a getdist command.

    So i set it up like this :

    (setq pt1 (grread nil 2))
    (setq l1 (ssget ":S"'((0 . "LINE"))))
    (setq w1 (getdist pt1 "Side : "))

    But it doesn't work...I don't know how the grread ting works at all...and the help file is pretty unhelpful...any suggestions?
     
    jojo, Nov 22, 2004
    #1
  2. Use ssnamex instead
     
    Marco Jacinto, Nov 22, 2004
    #2
  3. jojo

    jojo Guest

    could you give me a little more to go one than that? I don't know how to use ssnamex...
     
    jojo, Nov 23, 2004
    #3
  4. using the (entsel) will return the object picked and the point picked as
    well, i don't think you can use this with grread though.... you can try
    (nentselp) which i use with my grread commands to select an object that the
    mouse is over eg.

    (setq RESULT (grread T 4 2))
    ;;;gets the position of the cursor, can also get user input from keyboard
    (while (= (car RESULT) 5)
    ;;; while the user hasn't clicked a mouse button do this
    (setq DRAGPOINT (cadr RESULT))
    ;;; actual cordinate value

    (setq obj (car (nentselp DRAGPOINT)))

    (setq delaynum1 1)
    ;;; delay for somereason, i have no idea why, but it doesn't work without it
    (while (< (setq delaynum1 (+ delaynum1 1)) 100) (princ))

    (setq RESULT (grread T 4 2))
    ;;; duplicate code here

    (setq obj (car (nentselp DRAGPOINT)))

    (setq DRAGPOINT (cadr RESULT))
    ) ;while

    hope this helps

    cheers

    mark


    and then use the point that I picked to select the object in a getdist
    command.
    the help file is pretty unhelpful...any suggestions?
     
    Mark Dubbelaar, Nov 23, 2004
    #4
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.