Re Numbering command

Discussion in 'AutoCAD' started by rodolfnose, Jun 7, 2004.

  1. rodolfnose

    rodolfnose Guest

    In reply to autodesk.autocad.2004 newsgroup
    ;
    ; Automatic Numbering - in some cases it does not work.
    ;
    (Defun C:NUM (/ S NT P)
    (Setvar "CMDECHO" 0)
    (Setq
    S (GetDist "\nText Height? ")
    )
    (If (= NF Nil) (Setq NF 1))
    (Setq NT NF)
    (Setq
    NF (GetInt
    (Strcat
    "\nLast # used: "
    (ItoA (1- NF))
    ", enter starting #: <"
    (ItoA NF)
    "> "
    )
    )
    )
    (If (= NF Nil) (Setq NF NT))
    (While
    (Setq
    P (GetPoint "\nPick point:")
    )
    (Setq
    P (List (CAR P) (CADR P))
    )
    (Command
    ".TEXT" "M" P S "0" NF
    )
    (Setq NF (1+ NF))
    )
    (Setvar "CMDECHO" 1)
    (Prin1)
    )
     
    rodolfnose, Jun 7, 2004
    #1
  2. rodolfnose

    ECCAD Guest

    That would depend on the font used ?
    Some fonts do not need height / rotation.
    Bob
     
    ECCAD, Jun 7, 2004
    #2
  3. rodolfnose

    David Doane Guest

    Unless the text height in a Style is zero, the text command will not ask for
    a height. Therefore, when you input a height it will use it as the text
    angle. For general purpose use I usually put a test in before issuing the
    Text command, such as:

    (if (= (cdr (assoc 40 (tblsearch "style" zsty))) 0)
    (command ".text" "s" zsty "m" pnt1 ztsz ang2 ztxt)
    (command ".text" "s" zsty "m" pnt1 ang2 ztxt)
    )

    zsty = Style
    ztsz = Height
    ztxt = the text to be input.
     
    David Doane, Jun 8, 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.