Autolisp help, what am I missing

Discussion in 'AutoCAD' started by daayo, Jan 20, 2005.

  1. daayo

    daayo Guest

    I can't seem to get this to work. I am relatively new to lisp but thought this would work. any help will be appreciated. TIA

    (DEFUN C:WIREMARK (/ v sel)
    (SETVAR "CMDECHO" 0)
    (while (= sel nil)
    (setq sel (entsel "\nPick wire marker: "))
    (print)
    )
    (setq ent (entget (car sel))
    item (cdr (assoc 0 ent))
    )
    (PRINC "\nHow many wire markers:")
    (setq v (getstring))
    (COMMAND "-ARRAY" sel R 1 V))

    Erik Deyo
     
    daayo, Jan 20, 2005
    #1
  2. daayo

    Matt W Guest

    Dang! You beat me to it. :(
     
    Matt W, Jan 20, 2005
    #2
  3. daayo

    T.Willey Guest

    (DEFUN C:WIREMARK (/ v sel)
    (SETVAR "CMDECHO" 0)
    (while (= sel nil)
    (setq sel (entsel "\nPick wire marker: "))
    (print)
    )
    (setq ent (entget (car sel))
    item (cdr (assoc 0 ent))
    )
    ;(PRINC "\nHow many wire markers: ")
    (setq v (getint "\nHow many wire markers: "))
    (command "_.array" (car sel) "" "r" 1 v 0.25)
    )

    This should work. Fix your array command part, and changed where you had (getstring) which would work to a (getint).

    Tim
     
    T.Willey, Jan 20, 2005
    #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.