How to create text as like number in watch

Discussion in 'AutoCAD' started by Adesu, Jul 26, 2004.

  1. Adesu

    Adesu Guest

    I would create text/number as like in watch, but difficult to interpreting
    it,and I got program text serial position only,like this ;
    ;-------------
    ; Design by zeha
    (defun text_all (loc len tex it co)
    (command "_text" "_Non"
    (polar loc 0 (* len co)) ; to function serial
    tex "" it)
    ) ; end of defun
    (defun c:ts ( / count)
    (setq count 0
    loc (list 0 0)
    loc3 (list 15 0 0)
    tht 10
    len3 12)
    (if loc
    (foreach item '("A" "D" "E" "S" "U") ; I would replace with "1" "2" "3"
    ........"12"
    (text_all loc3 len3 tht item count)
    (setq count (1+ count))
    ) ; end of foreach
    ) ; end of if
    (princ)
    ) ; end of defun c:ts
    Is it possible to create it,with modified this program.Can anybody help me
    to solve this,thanks a lot for your reply.
    Best regards
    Ade Suharna
     
    Adesu, Jul 26, 2004
    #1
  2. Adesu

    ECCAD Guest

    Ade,
    Try this one:

    ;; Build Clock
    (defun dtr (x)(* pi (/ x 180.0)))

    (defun ins_text ()
    (if (= count 0)
    (setq an 0)
    (setq an (+ an 30))
    );if
    (setq ang (dtr an)); degrees to radians
    (setq px (polar pt ang di))
    (Command "_text" "_j" "_m" px ts "0" txt)
    ); function

    (defun C:clock ()
    (setq ts "1.0"); text size
    (setq pt (getpoint "\nPick Center of Clock:"))
    (command "_Point" pt)
    (command "_erase" "l" "")
    (setq px (car pt) py (cadr pt)); X and Y
    (setq di (getdist (getvar "LASTPOINT") "\n<Pick Top 12 O'Clock Point>"))
    (command "_circle" pt (+ (* 1.5 (atoi ts)) di))
    (setq count 0)
    (setq words (list "3" "2" "1" "12" "11" "10" "9" "8" "7" "6" "5" "4"))
    (foreach item words
    (setq txt item)
    (ins_text)
    (setq count (+ count 1))
    ); foreach
    (princ)
    ); defun
    (C:clock)

    Bob
     
    ECCAD, Jul 26, 2004
    #2
  3. Adesu

    Adesu Guest

    Hi ECCAD,wonderful after I look it,I've got it and thanks a lot,I very happy
    to find that.
    Best regards
    Ade Suharna
     
    Adesu, Jul 27, 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.