Define number of characters in Attribute

Discussion in 'AutoCAD' started by babtie, Feb 18, 2004.

  1. babtie

    babtie Guest

    Hi

    I am hoping I am posting on the correct board.

    Does anyone know whether there is a way to limit the amount of text in an attribute (Like datafields in Microstation). I need to limit the amount of text added to a block (say 20 characters per line).

    Thanks in advance
    Tracey
     
    babtie, Feb 18, 2004
    #1
  2. are you using the attdef or are you using lisp??? if you are only using the
    attdef no you cannot limit the amount of characters but if you plan on using
    lisp sure you can...


    attribute (Like datafields in Microstation). I need to limit the amount of
    text added to a block (say 20 characters per line).
     
    aaron weissner, Feb 18, 2004
    #2
  3. babtie

    babtie Guest

    Hi

    Thanks for your reply.
    I am currently using attdef. How would you use the lisp, where would I find out about getting a file to do this, and would it be noticeable for other users in the company as not all users like strange things happening...
    Finally will the entities still be attributes, and are they edited in the same manner?
    Cheers

    Tracey
     
    babtie, Feb 18, 2004
    #3
  4. well, is it a single attribute you are trying to change???(an existing
    block) or are you creating an entire new block... if its an existing block
    you coudl setup thing like:

    (defun gettxt () (setq ss1 (getstring))(if (> (strlen ss1) 20)(do
    this)(gettxt))(princ))(defun ea () (gettxt) (command "-attedit" "n" "n"
    "enter block name here" "enter attribute tag here" "" "" ss1)(princ))






    find out about getting a file to do this, and would it be noticeable for
    other users in the company as not all users like strange things happening...
     
    aaron weissner, Feb 18, 2004
    #4
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.