See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: Assign a color to a block without editing block or exploding block

  1. #1
    100 Club
    Join Date
    2016-04
    Location
    California
    Posts
    150
    Login to Give a bone
    0

    Default Assign a color to a block without editing block or exploding block

    Hello all,
    Is there a way to change the color of the line work in a block without exploding the block or editing the block? I want to keep the block as a block but just change the line color. When I change color in the properties menu, nothing changes i.e. the color description in properties does not override the block line color. The block I am using has all one line color but I use it in different locations where the line color needs to change.

    Thanks in advance,
    TT

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Assign a color to a block without editing block or exploding block

    Try putting the block on a different layer with the desired color.
    C:> ED WORKING....


    LinkedIn

  3. #3
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    2

    Default Re: Assign a color to a block without editing block or exploding block

    Select the block and choose 'Set Nested objects to ByBlock' from the right click menu.

  4. #4
    100 Club
    Join Date
    2016-04
    Location
    California
    Posts
    150
    Login to Give a bone
    0

    Default Re: Assign a color to a block without editing block or exploding block

    Yes that works. Thank you.
    TT

  5. #5
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Assign a color to a block without editing block or exploding block

    Quote Originally Posted by MMccall View Post
    Select the block and choose 'Set Nested objects to ByBlock' from the right click menu.
    I'm using 2018 and don't have that option. Where is it coming from?
    C:> ED WORKING....


    LinkedIn

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

    Default Re: Assign a color to a block without editing block or exploding block

    Quote Originally Posted by tadthurston725387 View Post
    Yes that works. Thank you.
    TT
    I assume you used Ed Jobe's suggestion?
    And I assume your block was created on layer zero?

    THAT is the very purpose and beauty of layer zero, when blocks are created on layer zero (and are ByLayer) they take-on the properties of the layer they are placed on.
    So you can have copies of the same block on many different layers and they can all appear different.

    Glad it worked out for you, that is what it is supposed to do.

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

    Default Re: Assign a color to a block without editing block or exploding block

    Quote Originally Posted by Ed Jobe View Post
    I'm using 2018 and don't have that option. Where is it coming from?
    In Civil 3D the right-click command is SetNestedObjectsByBlock. If not there it's also the command name. We could help each other a lot more if everyone added a signature with at least the AutoCAD version and vertical they're using. Different verticals have different commands and options which is probably the case here.

    I've also used lisp originally by one of AUGI's leaders Peter Jamtgaard that I modified to put all objects on layer 0 and set all properties to Byblock:
    Code:
    ; Written By: Peter Jamtgaard 12/20/2006
    ;^P(or C:BlkByBlock (load "BlkByBlock.lsp"));BlkByBlock
    (defun C:BlkByBlock (/ colBlockReference
                        ActDoc dprSelection
                        objSelection strBlockName
                     )
     (if (setq dprSelection (entsel "\nSelect Block: "))
      (progn
       (setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object))
             dprSelection (car dprSelection)
             objSelection (vlax-ename->vla-object dprSelection)
       )
       (vla-StartUndoMark ActDoc)
       (BlkByBlock objSelection)
       (entupd dprSelection)
       (vla-EndUndoMark ActDoc)
      )
     )
     (prin1)
    )
    
    (defun BlkByBlock (objSelection / colBlockReference objBlock
                        strBlockName
                     )
     (if (= (type objSelection) 'ENAME)
      (setq objSelection (vlax-ename->vla-object objSelection)))
     (if (wcmatch (strcase (vla-get-objectname objSelection)) "*BLOCK*")
      (progn
       (vlax-for objBlock (vla-item
                           (vla-get-blocks ActDoc)
                           (vla-get-name objSelection)
                          )
    
        (vla-put-Color objBlock 0)
        (vla-put-Layer objBlock "0")
        (vla-put-linetype objBlock "ByBlock")
        (vla-put-Lineweight objBlock -1)
        (vla-put-PlotStyleName objBlock "ByBlock")
       )
      )
     )
     (prin1)
    )
    (prin1)

  8. #8
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Assign a color to a block without editing block or exploding block

    Quote Originally Posted by Tom Beauford View Post
    In Civil 3D the right-click command is SetNestedObjectsByBlock. If not there it's also the command name. We could help each other a lot more if everyone added a signature with at least the AutoCAD version and vertical they're using. Different verticals have different commands and options which is probably the case here.
    I see, I'm not using C3D. I was focusing on the question at hand and forgot what forum I was in...You would think something basic like that would be in plain acad?
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Insert new block attribute without exploding...
    By jnantel in forum AutoCAD General
    Replies: 3
    Last Post: 2010-01-07, 11:27 PM
  2. Insert dynamic block without exploding
    By curtis.hatfield in forum Dynamic Blocks - Technical
    Replies: 1
    Last Post: 2009-10-26, 04:56 PM
  3. 3D Slice how make one side 2" larger without exploding
    By sherflor in forum AutoCAD 3D (2006 or below)
    Replies: 8
    Last Post: 2006-03-02, 12:49 AM
  4. Get composition of a object block without exploding it
    By d.cakmur in forum VBA/COM Interop
    Replies: 4
    Last Post: 2005-04-04, 05:01 PM
  5. Replies: 13
    Last Post: 2005-03-01, 12:49 PM

Tags for this Thread

Posting Permissions

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