globally rename anonymous blocks.

Discussion in 'AutoCAD' started by allanyz, Mar 31, 2005.

  1. allanyz

    allanyz Guest

    Has anyone got a lisp routine that can globally rename anonymous blocks. So that you can use AutoCAD commands to change them.

    The article on AutoCAD knowledge base was not very helpful, as it did not work and only worked on one block at a time (if it ever did work)

    Allan
    http://www.draftsperson.net/
     
    allanyz, Mar 31, 2005
    #1
  2. You can't rename anonymous blocks at all, so your
    only option is to create a new block from the
    exploded entities of an anonymous block, and then
    update all existing references to the anonymous
    block, to reference the new, named block instead.

    You can use the BLOCKREPLACE express tool to do
    that.
     
    Tony Tanzillo, Mar 31, 2005
    #2
  3. allanyz

    allanyz Guest

    so how you explode an anonymous block? YOU CAN"T !
     
    allanyz, Apr 1, 2005
    #3
  4. Who told you that you can't explode anonymous blocks?

    If you can't explode an anonymous block, it's not because
    it's an anonymous block, check the other possible reasons.
     
    Tony Tanzillo, Apr 1, 2005
    #4
  5. allanyz

    doug k Guest

    perhaps the OP sees anon blocks in the blocklist but does not know where
    they are in the drawing?
     
    doug k, Apr 1, 2005
    #5
  6. allanyz

    allanyz Guest

    I tell you now. no one told me you can't explode anonymous blocks. I have a drawing opened right now that has anonymous blocks that cannot be exploded !! (Acad 2004)

    I have however got this work around. and for the the purpose of this discussion the block in question is named *E105.

    1. RENAME *E105 to E105 (still an anonymous block, but now will appear in the BLOCKREPLACE drop down box)

    2. Create a matching block to replace E105. We will call this block COLUMN

    3. Use BLOCKREPLACE to replace E105 with COLUMN.

    That works.

    BUT this is a programming FORUM !! surely there must be an automated way of doing something similar to this, but on a global, fix all, it is all good kind of way?

    Allan
    http://www.draftsperson.net/
     
    allanyz, Apr 2, 2005
    #6
  7. allanyz

    Jeff Mishler Guest

    Alan, could you post a small sample file (dumbed down to R2002) that has one
    of these anonymous blocks in it? Looking through the docs I see ..... *Dnnn
    are dimensions, *Xnnn are hatches & *Unnn are user created anonymous blocks.

    Please remember, too, that: Yes, this is a programming forum for peer to
    peer support. BUT, none of us are mind readers (although some, including
    myself, try to interpret the intent/goal of the poster) so without a
    detailed description which includes any code you've tried and a sample
    drawing if you are working with items out of the ordinary. Being short and
    snappy towards folks that are attempting to help won't get you far......
     
    Jeff Mishler, Apr 2, 2005
    #7
  8. You cannot rename anonymous blocks. I'm not sure what
    you've got there, but I don't think it is a regular anonymous
    block, because they can't be renamed.

    Can you post a sample drawing with one of them in it?
     
    Tony Tanzillo, Apr 2, 2005
    #8
  9. allanyz

    Doug Broad Guest

    Allan,
    This is from the help files on "explode":

    "When nonuniformly scaled blocks contain objects that cannot be exploded, they are collected into an anonymous block (named with a
    "*E" prefix) and referenced with the nonuniform scaling. If all the objects in such a block cannot be exploded, the selected block
    reference will not be exploded. Body, 3D Solid, and Region entities in a nonuniformly scaled block cannot be exploded."

    I'm curious why you would want to explode such blocks. This particular behavior of not
    exploding blocks that contain only objects that can't be exploded seems to be designed
    for a purpose.

    Regards,

    Doug
     
    Doug Broad, Apr 2, 2005
    #9
  10. allanyz

    allanyz Guest

    whatever jeff.
     
    allanyz, Apr 4, 2005
    #10
  11. allanyz

    Doug Broad Guest

    Allan,
    Don't have time to give you much help. There appears to
    be no reason that the blocks in your file are anonymous but it could
    be possible that an automatically generated drawing file could have
    problems. An Audit of the file found 40 problems with blocks. I'm
    not sure that this is relevant.

    Theoretically, you should be able to copy the objects from the
    root block definition(s) and create a new non-anonymous
    block definition from them. If you already know what the columns
    should look like, then you can just collect the insertion point and
    rotation information from the existing block references and then
    replace them by having a progam erase them and re-insert correct
    blocks.

    Regards,
    Doug
     
    Doug Broad, Apr 4, 2005
    #11
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.