DATE LISP

Discussion in 'AutoCAD' started by huuy, Jan 29, 2005.

  1. huuy

    huuy Guest

    DOES ANYONE HAVE A PLACE WHERE I CAN GET A GOOD DATE-CHANGER FOR
    TITLE-BLOCKS WITH ATTRIBUTES?? I NEED THE LISP FOR THIS.

    THANKS

    COLE
     
    huuy, Jan 29, 2005
    #1
  2. huuy

    Vleugels Guest

    Don't shout. Nobody will answer this.
     
    Vleugels, Jan 29, 2005
    #2
  3. I change the same attribute to the same value in multiple
    instances of the same block with ATT-FILL.LSP
    You have to REGEN afterwards to see the changes.

    I can't remember who gave it to me, and it is unsigned.
    --------------------------------------------------------------------------

    (defun c:att-fill ()
    (setq str1 (if str1 str1 "")
    str1a (getstring (strcat "Attribute tag to fill <" str1 ">: "))
    str1 (if (= str1a "") str1 str1a)
    str2 (if str2 str2 "")
    str2a (getstring T (strcat "New value for Attribute <" str2 ">: "))
    str2 (if (= str2a "") str2 str2a)
    )
    (prompt "Select objects to fill: ")
    (setq ss1 (ssget)
    count 0
    )
    (while (setq e1 (ssname ss1 count))
    (setq elist1 (entget e1)
    etype1 (cdr (assoc 0 elist1))
    count (1+ count)
    )
    (if (= "INSERT" etype1) (attfil-ss e1 str1 str2))
    )
    (princ)
    )


    ;attribute fill selection set
    (defun attfil-ss (ename1 atttag attval /)
    (setq e2 (entnext ename1) ;select entity
    atttag (strcase atttag)
    )
    ;find correct attribute
    (while e2
    (setq elist2 (entget e2)
    attta1 (cdr (assoc 2 elist2))
    endtest (cdr (assoc 0 elist2))
    )
    ;if correct attr, edits attr, else goes to next attr
    (if (= attta1 atttag) (progn (setq e2 nil)
    (entmod (subst (cons 1 attval) (assoc 1 elist2) elist2))
    ; (entupd ename1)
    );end progn
    (setq e2 (entnext e2))
    );end if
    (if (= endtest "SEQEND") (setq e2 nil)
    );endif
    );end while
    )
     
    Michael Bulatovich, Jan 29, 2005
    #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.