See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: BLOCK ATTRIBUTE

  1. #1
    All AUGI, all the time
    Join Date
    2004-06
    Location
    Slidell, Louisiana
    Posts
    972
    Login to Give a bone
    0

    Default BLOCK ATTRIBUTE

    Is there a way to change the color of attributes globally. i have a drawing that i wblocked some points with attributes (point no., desc. and elevation) and inserted into a new drawing.
    they list as a block reference. if i select it and go to properties, they show up as a block reference. if i double click it, it shows it has attributes, but in the block editor nothing shows up.
    if i insert the block it is nothing like the block in the drawing. i need to globally change the attributes from white to by layer in color.

    anybody have an idea? FYI, the drawing i wblocked from is a newer version of civil 3d and i'm running 2017. the wblock came in fine.
    i can edit them one at a time, but that would take forever. if i explode them everything disappears.

    Also, if i use battman, it says the block has no attributes
    Last edited by rmk; 2018-09-07 at 02:42 AM.

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    0

    Default Re: BLOCK ATTRIBUTE

    Have you tried the Block Attribute Manager? I remember Eagle Point would add attributes to block point insertions, their block definitions had no attributes defined in them. Not sure what type of Civil 3D blocks you're describing. Could you attach a small drawing with just a couple of those blocks in it so we can take a shot at it?

  3. #3
    All AUGI, all the time
    Join Date
    2004-06
    Location
    Slidell, Louisiana
    Posts
    972
    Login to Give a bone
    0

    Default Re: BLOCK ATTRIBUTE

    i will upload some later this evening. i'm at work and this project is on my home computer.
    thanks

    i did try block attribute manager (battman) it said the block had no attributes.

  4. #4
    All AUGI, all the time
    Join Date
    2004-06
    Location
    Slidell, Louisiana
    Posts
    972
    Login to Give a bone
    0

    Default Re: BLOCK ATTRIBUTE

    here is the dwg file. hope you can figure it out.

    thanks
    Attached Files Attached Files

  5. #5
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    1

    Default Re: BLOCK ATTRIBUTE

    Quote Originally Posted by rmk View Post
    here is the dwg file. hope you can figure it out.

    thanks
    That is very odd, it is a block, a point, with attributes that aren't actually part of the block definition, and not a nested block.

    I have heard of this before, but I don't know how such a thing is created or edited??

    Hope someone else has some insight.

  6. #6
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    1

    Default Re: BLOCK ATTRIBUTE

    There are/have been 3rd party add-ons that handle surveyed points that way, I occasionally see them, but so far have not needed to do much with them other than use the elevation info,

    They are created programmatically, and in theory ought to be modified/edited in whatever app created them.

    You can use BURST to explode them and keep the data, the point object are created at an elevation, so could be used to create c3d points

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    1

    Default Re: BLOCK ATTRIBUTE

    Code:
    (load "ATTEDMUL.LSP")
    to load, then AEM to run.
    Code:
    ;PROUDLY PRESENTED BY A.N.U.S.
    
    ;|Attributes Edit Multiple ; release 1.1
      Edits Color, Style, Rotation Angle, Height of selected attribule in all blocks
      Just pick the attribute you want to change
      Created by Radoslav Radanov ; 17.04.1997 ; Sofia ; Bulgaria ; E-MAIL: mitko_r@hotmail.com
      WE CAN MADE FOR YOU ALL THE NECESSARY STUFF FOR AUTOCAD IN *.LSP or *.ARX
      Modified to edit Layer and added default prompts by: Tom Beauford Dec. 28, 2001
      Have FuN!
      (load "ATTEDMUL.LSP") AEM |;
    
    (defun ChLayBlk(el lay)  ;Change el Layer
      (if(assoc 8 el)
        (setq el(subst(cons 8 lay)(assoc 8 el)el))
        (setq el(append(list(cons 62 lay))el))
      )
      (entmod el)
      (entupd BlkEntName)
    )
    (defun ChColBlk(el NewCol)  ;Change el Color
      (if(assoc 62 el)
        (setq el(subst(cons 62 NewCol)(assoc 62 el)el))
        (setq el(append(list(cons 62 NewCol))el))
      )
      (entmod el)
      (entupd BlkEntName)
    )
    (defun ChHeiBlk(el NewHei)  ;Change el Height
      (setq el(subst(cons 40 NewHei)(assoc 40 el)el))
      (entmod el)
      (entupd BlkEntName)
    )
    (defun ChRotBlk(el NewRot)  ;Change el Rotation
      (setq el(subst(cons 50 NewRot)(assoc 50 el)el))
      (entmod el)
      (entupd BlkEntName)
    )
    (defun ChStyBlk(el NewSty NewFac NewAng)  ;Change el Style
      (if(tblsearch "style" NewSty)
        (progn
          (if(assoc 7 el)
            (setq el(subst(cons 7 NewSty)(assoc 7 el)el))
            (setq el(append(list(cons 7 NewCol))el))
          )
    ;      (setq el(subst(cons 7 NewSty)(assoc 7 el)el))
          (setq el(subst(cons 41 NewFac)(assoc 41 el)el))
          (setq el(subst(cons 51 NewAng)(assoc 51 el)el))
        )
        (princ "\n Style Not Found")
      )
      (entmod el)
      (entupd BlkEntName)
    )
    (defun FindAtt()
      (setq BlkEntName(ssname BlkSs CouF))
      (setq CurrEnt BlkEntName)
      (setq AttEntName nil)
      (while (= AttEntName nil)
        (setq CurrEnt(entnext CurrEnt))
        (if(= (cdr(assoc 2 (entget CurrEnt))) AttTag)
            (setq AttEntName CurrEnt)
        );if
      );while
      (setq el(entget AttEntName))
    )
    
    (defun C:AEM (/ PoiAndAtt  PickedPoi  CheVol  AttEntName el
                    AttTag   AttLay   AttCol   AttRot   AttHei   AttSty
                    BlkEntName BlkName    BlkSs   CouF       ActIni     NewCol
                    lay  NewRot     NewHei     NewSty  NewFac     NewAng)
      (setq PoiAndAtt(nentsel "\nSelect Attribute to Change:"))
      (setq PickedPoi(cadr PoiAndAtt))
      (if(= (setq CheVol(cdr(assoc 0(entget(car PoiAndAtt))))) "ATTRIB")
        (setq AttEntName(car PoiAndAtt))
        (while (/= CheVol "ATTRIB")
          (setq PoiAndAtt(nentsel "\nInvalid Selection. Pick Again:"))
          (setq PickedPoi(cadr PoiAndAtt))
          (if(= (setq CheVol(cdr(assoc 0(entget(car PoiAndAtt))))) "ATTRIB")
            (setq AttEntName(car PoiAndAtt))
          );if
        );while
      );if
      (setq el(entget AttEntName))
      (setq AttTag(cdr(assoc 2 el)))
      (setq AttLay(cdr(assoc 8 el)))
      (setq AttCol(cdr(assoc 62 el)))
      (if(null AttCol)(setq AttCol 256))
      (setq AttRot(cdr(assoc 50 el)))
      (setq AttHei(cdr(assoc 40 el)))
      (setq AttSty(cdr(assoc 7 el)))
      (setq BlkEntName(ssname(ssget PickedPoi(list(cons 0  "insert")))0))
      (setq BlkName(cdr(assoc 2(entget BlkEntName))))
    ;;; BlkSs = Selection Set of all Block Insertions of the Selected Block
      (setq BlkSs(ssget "x"(list (cons -4 "<and")(cons 0 "insert")(cons 2 BlkName)(cons -4 "and>"))))
      (setq CouF 0)
      (initget 1 "Lay Col Rot Hei Sty")
      (setq ActIni(getkword "\n[Layer/Color/Rotation angle/Height/Style]:"))
      (cond
        ((= ActIni "Lay")
         (setq lay(getstring (strcat "\nNew Layer Name <" AttLay ">")))
         (if (= 0 (strlen lay))
           (princ "\nNo Change!")
           (repeat (sslength BlkSs)
             (FindAtt)
             (ChLayBlk el lay)
             (setq CouF(+ CouF 1))
           );repeat
         );if
        );"Lay"
    
        ((= ActIni "Col")
         (setq NewCol(getint (strcat "\nNew Color Number <" (itoa AttCol) ">")))
         (if (null NewCol)
           (princ "\nNo Change!")
           (repeat (sslength BlkSs)
             (FindAtt)
             (ChColBlk el NewCol)
             (setq CouF(+ CouF 1))
           );repeat
         );if
        );"Col"
    
        ((= ActIni "Rot")
         (setq NewRot(getorient (strcat "\nNew Rotation Angle <" (angtos AttRot 0 4) ">")))
         (if (null NewRot)
           (princ "\nNo Change!")
           (repeat (sslength BlkSs)
             (FindAtt)
             (ChRotBlk el NewRot)
             (setq CouF(+ CouF 1))
           );repeat
         );if
        );"Rot"
    
        ((= ActIni "Hei")
         (setq NewHei(getdist (strcat "\nNew Height <" (rtos AttHei 2 4) ">")))
         (if (null NewHei)
           (princ "\nNo Change!")
           (repeat (sslength BlkSs)
             (FindAtt)
             (ChHeiBlk el NewHei)
             (setq CouF(+ CouF 1))
           );repeat
         );if
        );"Hei"
    
        ((= ActIni "Sty")
         (setq NewSty(getstring (strcat "\nEnter New Style Name <" AttSty ">")))
         (if (= 0 (strlen NewSty))
           (princ "\nNo Change!")
           (progn
             (setq NewFac(cdr(assoc 41(tblsearch "style" NewSty))))
             (setq NewAng(cdr(assoc 50(tblsearch "style" NewSty))))
             (repeat (sslength BlkSs)
               (FindAtt)
               (ChStyBlk el NewSty NewFac NewAng)
               (setq CouF(+ CouF 1))
             );repeat
           );progn
         );if
       );"Sty"
      );cond
      (princ)
    )
    No refference link as the internet wasn't much of a resource in 1997.

  8. #8
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    1

    Default Re: BLOCK ATTRIBUTE

    Quote Originally Posted by rmk View Post
    what exactly does this do Tom? I'm not a lisp expert. depending on what this does, i may try cadtag's idea and burst them (which i totally forgot about) and then create civil 3d points from that. i may a little
    cleanup, i.e. change the descriptions for some
    Run the command, then select an attrubute, then pick Color and enter a color number like 5 for blue and it will globally change the color of all matching attributes in the drawing.

    There are options to globaly change Layer, Color, Rotation angle, Height, or Style. I'd want to change the Style as well.

    Really old routine as apparent by the color options, but still functional.

  9. #9
    All AUGI, all the time
    Join Date
    2004-06
    Location
    Slidell, Louisiana
    Posts
    972
    Login to Give a bone
    1

    Default Re: BLOCK ATTRIBUTE

    thanks Tom, this will come in handy.
    just FYI, somehow i accidentally deleted my last post. LOL
    had a senior moment.

  10. #10
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,665
    Login to Give a bone
    1

    Default Re: BLOCK ATTRIBUTE

    Quote Originally Posted by rmk View Post
    thanks Tom, this will come in handy.
    just FYI, somehow i accidentally deleted my last post. LOL
    had a senior moment.
    Turning 62 soon, understand completely!

Page 1 of 2 12 LastLast

Similar Threads

  1. How to change dynamic block attribute default values based on block selected?
    By zeirz109180 in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2013-12-13, 02:20 PM
  2. Replies: 13
    Last Post: 2012-09-18, 07:51 PM
  3. Copy previous Block Attribute Value to next Block Attribute
    By CADfunk MC in forum VBA/COM Interop
    Replies: 8
    Last Post: 2009-02-27, 09:46 PM
  4. Block attribute text size is incorrect when the Block is not selected
    By lwhitney.133796 in forum AutoCAD General
    Replies: 3
    Last Post: 2007-02-16, 10:01 PM
  5. Block Attribute Manager Vs. Enhanced Attribute Editor
    By zoomharis in forum AutoCAD General
    Replies: 0
    Last Post: 2006-04-15, 11:53 AM

Posting Permissions

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