Results 1 to 5 of 5

Thread: Set Attribute text color to Bylayer

  1. #1
    I could stop if I wanted to
    Join Date
    2015-12
    Posts
    383
    Login to Give a bone
    0

    Default Set Attribute text color to Bylayer

    Hey all,
    It got WAY too cold this morning, it was at 30deg. (Thats unacceptable, Im in Florida for a reason!)

    Problem:
    Attribute color is set to green (or whatever color someone set it to).
    I would like to find a way to change the attrib text property to "By Layer"

    The only way I know how to do it now is through the 'enhanced Attribute Editor"

    Is there a better way to do this? one that will work on all attributes in a selection set?

    Thank you all,
    Andre

  2. #2
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Set Attribute text color to Bylayer

    Yup.
    Psuedo code
    Get your selection set of blocks,
    Then step through your selection set
    Then step through your block entity
    If the entity name is "SEQEND" you are done with that block,
    if it equals "ATTRIB" then you want to change the color dxf code to 256.

  3. #3
    I could stop if I wanted to
    Join Date
    2015-12
    Posts
    383
    Login to Give a bone
    0

    Default Re: Set Attribute text color to Bylayer

    not quite sure I understand what you mean "Step through" and the idea is to change many blocks at once, this last project, we changed 100 plus attributes

  4. #4
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Set Attribute text color to Bylayer

    Code:
    (defun c:Test ()
    
    (setq cnt -1)
    (if (setq ss (ssget '((0 . "INSERT") (66 . 1))))
     (while (setq ent (ssname ss (setq cnt (1+ cnt))))
      (while (= (cdr (assoc 0 (setq entdata (entget (setq ent (entnext ent)))))) "ATTRIB")
       (if (assoc 62 entdata)
        (entmod (subst (cons 62 256) (assoc 62 entdata) entdata))
       )
      )
     )
    )
    (princ)
    )
    Fix code per Kennets comments. Thanks Kennet.
    Last edited by T.Willey; 2007-01-30 at 11:01 PM.

  5. #5
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Set Attribute text color to Bylayer

    oops . . typo in line (while (= (cdr (assoc 0 (setq . . .


    : ) Happy Computing !

    kennet

Similar Threads

  1. Changing attributes color bylayer...?
    By aport in forum AutoCAD LT - General
    Replies: 5
    Last Post: 2018-09-11, 02:18 PM
  2. Need ssget syntax for color NOT bylayer
    By GeorgeM in forum AutoLISP
    Replies: 2
    Last Post: 2008-11-14, 07:56 PM
  3. Change Attributes to color ByLayer
    By rmk in forum AutoCAD General
    Replies: 7
    Last Post: 2008-01-22, 12:24 AM
  4. Changing block entities' color to bylayer
    By sifuentes in forum AutoCAD General
    Replies: 20
    Last Post: 2004-11-12, 04:44 PM
  5. Export layers - color bylayer???
    By christo4robin in forum Revit Architecture - General
    Replies: 2
    Last Post: 2003-12-30, 10:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •