TheSwamp

CAD Forums => CAD General => Topic started by: craigr on March 19, 2009, 11:54:08 AM

Title: Problem Block and Layer Merge
Post by: craigr on March 19, 2009, 11:54:08 AM
I have a problem block that I can't figure out - See attached.

It is a 'copyright' stamp we have on our Title Block. For some reason, with this block in our dwg, the layer merge command won't merge ANY layers. If I delete the block and purge, then re-run the Layer Merge command, it works fine.

I can't figure why it would make a difference but it does every time on all dwgs that have this block.

So when we want to run the layer merge, we have to go thru the process of deleting this block then adding it back in when we are finished.

Do any of you have an idea of what is causing this?

craigr
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 19, 2009, 12:01:19 PM
You must be trying to get rid of the TITLE_BLOCK layer.

Everything in that block is on that layer.  Go in and change everything to layer 0 and purge TITLE_BLOCK layer out of that file and save it.  Then go and redefine the block in your drawing and it should work.
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 19, 2009, 12:04:09 PM
Oh, actually, that's a block OF a block called Copyright.


Still, once its exploded, everything is on the TITLE_BLOCK layer.
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 19, 2009, 12:04:25 PM
No, 'Title_Block' is our 'standard' layer and has everything that doesn't get changed on it. It is in EVERY dwg we do.

For some reason, if I want to merge layer '2' into layer '3' it won't work unless I erase the 'copyright' block first.

craigr
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 19, 2009, 12:07:47 PM
Oops... sorry.

have you tried changing the current layer before LAYMRG instead of deleting this block?
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 19, 2009, 12:10:42 PM
Oops... sorry.

have you tried changing the current layer before LAYMRG instead of deleting this block?

I am typically on layer '0' when I am merging layers. I NEVER use the Title block for anything but our 'standards' that are on that layer. Nothing is every added or deleted from that layer, so I am never on that layer. Basically, it is just ignored, because it is just the 'Title Block'. I keep it locked so when eraseing & moving things, I don't have to worry about grabbing it by mistake.

craigr
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 19, 2009, 12:28:31 PM
I have created a 'typical' dwg that has the block in it and reproduces the problem.

If you think you can figure it out, give it a try. - See attached.

craig
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 19, 2009, 12:31:40 PM
All I can see is that by unlocking TITLE_BLOCK, LAYMRG works... it's the WHY that I can't figure out, unless that command is just one of the few commands that locking layers affects.
Title: Re: Problem Block and Layer Merge
Post by: CottageCGirl on March 19, 2009, 12:33:59 PM
why can't I explode the copywright block..is it a block?
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 19, 2009, 12:37:39 PM
The copyright is in PSpace.

If you unlock the layer, you CAN explode it.
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 19, 2009, 12:48:56 PM
and the copyright symbol ( © ) is text
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 08:31:39 AM
Well I decided to try something else.

I made a new block to replace the old. I then erased the old block from the dwg, purged a couple of times, then inserted the new block. I then tried the Layer Merge and STILL have the problem.

This tells me that it shouldn't have anything to do with the block, but it does. If I remove the block from the dwg, The layer merge works fine.

Any other ideas would be welcomed.

craigr
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 26, 2009, 08:43:28 AM
I don't know... that is strange, and I've had a few drawings that have caused me problems with that command too.  I just didn't have time to screw around with it and just did it manually.

Gotta think on it a bit
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 08:47:13 AM
Sadly, that is one of my flaws. - I have a very tough time with 'that's just the way it is. Let it go'.

I REALLY want things to work right, and always spend too much time on trying to figure out why they don't.

I will just keep pecking away at it and one of these days / years, I will figure it out.

craigr
Title: Re: Problem Block and Layer Merge
Post by: Matt__W on March 26, 2009, 10:03:04 AM
It works fine for me.   :|
AutoCAD MEP 2008



Have you tried auditing your drawing(s)?
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 10:03:56 AM
....
Have you tried auditing your drawing(s)?

MANY, MANY, MANY times.
Title: Re: Problem Block and Layer Merge
Post by: MP on March 26, 2009, 10:24:03 AM
What happens if you run this code:

Code: [Select]
(progn
    (command ".layer" "_unlock" "*" "_thaw" "0" "_on" "0" "_set" "0" "")
    (foreach handle '("2d2e" "2d2f" "2d30" "2d36")
        (vla-put-layer (vlax-ename->vla-object (handent handle)) "0")
    )
    (princ)
)

On Problem Block2.dwg as supplied|attached to this (http://www.theswamp.org/Themes/default/images/post/xx.gif) post?

Edit: Fixed stupid typo.
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 10:26:00 AM
HUH!???

That is WAYYY above me!

I'm guessing that is Lisp Code.

I am using LT which unfortunately doesn't use Lisp.

Thanks though
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 26, 2009, 10:29:05 AM
Craig, I just tried again and was able to merge layer2 into layer1 AFTER unlocking and thawing all layers.
Title: Re: Problem Block and Layer Merge
Post by: MP on March 26, 2009, 10:30:09 AM
HUH!???

That is WAYYY above me!

I'm guessing that is Lisp Code.

I am using LT which unfortunately doesn't use Lisp.

Thanks though

DOH.

See attached. Is it still goofy?
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 10:37:20 AM
Yes, it still acts goofy.

As soon as I move the block back to the TitleBlock Layer, and lock the TitleBlock layer, the LayerMerge fails again.

I'm thinking this is more of an issue with CAD than with my block &/or dwg. I know it isn't just my installation, as the problem is reproducable on multiple workstations.

It's a dome scratcher, that's for sure.

craigr
Title: Re: Problem Block and Layer Merge
Post by: MP on March 26, 2009, 10:40:38 AM
... as soon as I move the block back to the TitleBlock Layer, and lock the TitleBlock layer ...

And if you don't do that?
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 10:43:38 AM
If I don't do that, it works fine.

Not having it locked on the Title Block Layer is NOT an option.

Looks like we will have to continue to live with it.

What I don't understand is that if the block doesn't exist in the dwg, everything works great. Yet I have erased, purged and recreated the block, yet it still does it.
Title: Re: Problem Block and Layer Merge
Post by: MP on March 26, 2009, 10:48:18 AM
Pragmatism: Set the drawing up so you can perform mods (like layer merge) as necessary (i.e. not locked et al), re-layer afterwards.

If I had more time I'd do a more thorough job of analyzing your dwg | behavior but I don't and can't.
Title: Re: Problem Block and Layer Merge
Post by: craigr on March 26, 2009, 10:50:01 AM
Hey, I appreciate what you HAVE done.

It isn't a HUGE deal, just more annoying than anything.

Get back to work - and Thanks.

craigr
Title: Re: Problem Block and Layer Merge
Post by: MP on March 26, 2009, 10:55:05 AM
I didn't really spend any time on it, but thanks Craig.
Title: Re: Problem Block and Layer Merge
Post by: M-dub on March 26, 2009, 11:05:31 AM
Throw this into a button and give it a try.

^C^C-la;u;title_block;;-laymrg;\;\y;-la;lo;title_block;;

It will allow you to make two selections only.  The first being the layer you want to merge (get rid of) and the second being the layer you want to merge TO (the one you want to keep).
Title: Re: Problem Block and Layer Merge
Post by: craigr on April 02, 2009, 12:47:16 PM
Update -

This still bugs me, so after doing some more thinking on it, I decided to totally create a NEW block and try it. - The problem remains.

I played with locking / unlocking as suggested and it kinda worked but I wasn't happy with doing it that way. So I experimented some more and figured out that if I explode the block after inserting it into the dwg, THEN locking that Layer, everything works okay.

I don't understand why it matters, but it apparently does. I guess I can live wiith it from here.

(I HATE not understanding why something doesn't work).

craigr
Title: Re: Problem Block and Layer Merge
Post by: craigr on April 15, 2009, 04:45:37 PM
Dog-Gone-IT!!!!

I thought I had this #%I#($ thing figured out!

I have another dwg that was giving me problems with Merging layers, so I got rid of the 'copyright' block altogether and it still had problems merging. So, I copied everything to a NEW dwg without a title block and it still had the problems!!

So I then unlocked ALL Layers and no problems merging layers.

So, now I am guessing that the LayerMerge command wants ALL layers unlocked.

I know, I know... I just can't let this thing go. :)

craigr