How to create automatic radius

Discussion in 'AutoCAD' started by Adesu, Mar 14, 2005.

  1. Adesu

    Adesu Guest

    (setq cnt 0)
    (setq rad 0)
    (setq n 200)
    (setq loc '(0 0))
    (repeat n
    (cond ((and (>= cnt rad)(< cnt rad))))
    (setq rad (+ 1 rad))
    (set (read (strcat "rad" "(" list rad ")"))) ;>>> problem here
    (setq cnt (1+ cnt))
    )

    I would create (setq rad (list 1 2 3 4 5 6 7 etc.....))
     
    Adesu, Mar 14, 2005
    #1
  2. Adesu

    Adesu Guest

    Hi.. I 've got only one step,how to become a list

    (setq cnt 0)
    (setq rad 0)
    (setq n 200)
    (setq loc '(0 0))
    (repeat n
    (cond ((and (>= cnt rad)(< cnt rad))))
    (setq rad (princ (+ 1 rad)))
    ;(setq rad (mapcar 'chr (vl-string->list rad)))
    (setq cnt (1+ cnt))
    )
    0
    0
    200
    (0 0)
    123456789101112131415161718192021222324252627282.........(snip)

    I plan to (setq rad '( 1 2 3 4 5 6 7 ........etc))
     
    Adesu, Mar 14, 2005
    #2
  3. Adesu

    Joe Burke Guest

    Hi Ade,

    I'm not sure this will help.

    Command: (setq cnt 0)
    0
    Command: (setq rad 12)
    12
    Command: (repeat rad (setq cnt (1+ cnt)) (setq lst (append lst (list cnt))))
    (1 2 3 4 5 6 7 8 9 10 11 12)

    Or using cons rather than append:

    Command: (repeat rad (setq cnt (1+ cnt)) (setq lst (cons cnt lst)))
    (12 11 10 9 8 7 6 5 4 3 2 1)
    Command: (reverse lst)
    (1 2 3 4 5 6 7 8 9 10 11 12)

    Joe Burke
     
    Joe Burke, Mar 14, 2005
    #3
  4. Adesu

    Adesu Guest

    Hi Joe,it was work great,thanks a lot for your help
     
    Adesu, Mar 15, 2005
    #4
  5. Adesu

    Joe Burke Guest

    Ade,

    You're welcome. Glad to hear that helped.

    Joe Burke
     
    Joe Burke, Mar 15, 2005
    #5
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.