Automatic Numbering of Blocks...

Discussion in 'AutoCAD' started by Jambruins, Nov 18, 2004.

  1. Jambruins

    Jambruins Guest

    I am looking for a lisp routine that labels things as follows:
    A-1, A-2, A-3 and so on. How would I do this? Thanks

    Something similar to the lisp routine in the Automatic Numbering post by Micheal Regan.

    Thanks
     
    Jambruins, Nov 18, 2004
    #1
  2. Use (while) to step through the labels, (1+) to increment the numerical
    value, (itoa) to convert that to a text string, and (strcat) to attach that
    to "A-" for each successive label. Something like:

    (setq cardinalno 1)

    Make a "while" loop that checks for some condition like the number of labels
    left to go. Inside that, do something like:

    (setq labeltext (strcat "A-" (itoa cardinalno)))

    and use that as the text content, then

    (setq cardinalno (1+ cardinalno))

    so it will be 2 for the next one, etc.
     
    Kent Cooper, AIA, Nov 18, 2004
    #2
  3. Jambruins

    Jambruins Guest

    I have no idea how to create a while loop. I don't know much about creating lisp routines either. I would need someone to basically write it for me. I was hoping someone would have already done this. Thanks for the help though.
     
    Jambruins, Nov 18, 2004
    #3
  4. Jambruins

    Paul Turvill Guest

    You'll *never* learn by begging for freebies. Most of the folks who hang out
    here will freely offer help to those willing to at least make a stab at
    learning on their own.
    ___
     
    Paul Turvill, Nov 18, 2004
    #4
  5. Jambruins

    Jambruins Guest

    thanks Paul
     
    Jambruins, Nov 18, 2004
    #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.