Layer problem associated with block

Discussion in 'AutoCAD' started by Norman Yuan, Sep 21, 2004.

  1. Norman Yuan

    Norman Yuan Guest

    I ran into a problem that I do not undestand why:

    1. there is a block definition BlockA, say, two circles on layerA;
    2. Open a new drawing, insert BlockA, Thus, layerA is introduced to the
    drawing;
    3. Later, I decide to redo BlockA, still two circles, but on LayerB (LayerA
    in the block file is purged, not existed anymore);
    4. I reinsert BlockA to the drawing to cause the BlockA's definition
    redefined;
    5. Now I want to purge LayerA, since no BlockReference or Block Definition
    refereces LayerA, I should be able to purge, but I cannot. I deleted the
    inserted Block reference, still can purge LayerA. I use code to loop through
    the block's entities in definition (tow circles) to examine their Layer
    property, it is LayerB, not LayerA, as I expected.
    6. It is only after I purge the block definition (remember it DOES NOT have
    reference to LayerA in its definition), LayerA is freed up for purging.

    It seems, if you redefine a block definition, a layer that previously exists
    in the old block definition is still associated to the block's new
    definition, but you will not be able to find it by examine each
    Block.Item(i)'s Layer property, it just exists in the drawing somewhere.

    Can someone explain this.

    What I want to do is that I have 1200 drawings with a particular block. I
    need to redefine the block on new layer(s). In my batch updating procedure,
    I successfully updated the block (new layer(s) were brought in with the new
    block definition), but I cannot purge the old layer(s) used in old block
    definition, although no entities, no blocks have reference to these layers.
    They can only be purged if I purge the new block. Any idea how can I purge
    those layers?
     
    Norman Yuan, Sep 21, 2004
    #1
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.