PDA

View Full Version : about deleting unwanted and unused blocks and layers



alijahed
26th Jun 2008, 01:17 am
Hi All,

I don't know why these weird things around me these days:cry:

I think I should explain a little bit about it for better understanding the situation.
I usually use purge to clean up my drawings because I'm working with somebody else drawings so for make it uniform I copy things from their drawing and paste it in my drawing and then change the things to my standard.

At the moment after purging I still have some unwanted layers and when I trying to delete them it says that it's using and when I use the Qsearch to find them I couldn't find anything so as a last option I use LAYMRG and merge that in to the closest layer which I have (if there is a better way please tell me).
the other problem is about blocks. After purging when I go to Designcenter (or in inser block window) I still have some unwanted and unused blocks and unfotunately I can't find them with Qsearch and of course with my eyes :wink: and when I R-click on them in Designcenter there is no option to delete them from there.
can you please help me it's really annoying..

Cheers

Ali

YZ
26th Jun 2008, 04:48 am
At the moment after purging I still have some unwanted layers and when I trying to delete them it says that it's using and when I use the Qsearch to find them I couldn't find anything so as a last option I use LAYMRG and merge that in to the closest layer which I have (if there is a better way please tell me).

I did not know about the LAYMRG command, that seems a great idea. But it is not ideal for what I think you are trying to accomplish. That would be good if you had a standard layer called, for example, "Northpoint" and you imported a drawing whose standard layer was "Nth" or something, then you could quickly transfer those objects into your standard.

But what I think you are trying to do is to eliminate excess stuff and cleanup the drawing. There is a command called LAYDEL which can get rid of some layers that cannot be purged. (It can't remove anything that is XREF'd.)

I suspect that there are blocks that have those extra layers in their definition. If the block is in a certain layer, say "Scale", but inside it there are objects in a layer "Text", then if scale layer is OFF, but text is ON, you still would not see those text objects.


the other problem is about blocks. After purging when I go to Designcenter (or in inser block window) I still have some unwanted and unused blocks

Again, I would check if there are blocks within blocks. Especially if I picked up the drawing from someone else.

luther4000
26th Jun 2008, 06:25 am
I am just guessing but I guess a way around could be to create a block only containing 1 line on layer 0. Then use BLOCKREPLACE command to replace all the blocks that you think you cannot purge for the new block.
I don't know if that will work but nothing else comes to my mind right now, sorry.

alijahed
26th Jun 2008, 06:44 am
Thanks but it doesn't work I've attached one of those files. can somebody play around to remove that block appears in designcenter window and also those unused layers.:cry:

Cheers


I am just guessing but I guess a way around could be to create a block only containing 1 line on layer 0. Then use BLOCKREPLACE command to replace all the blocks that you think you cannot purge for the new block.
I don't know if that will work but nothing else comes to my mind right now, sorry.

luther4000
26th Jun 2008, 07:03 am
i PURGED and couldn´t get rid of ASL-DIM but I don´t see any blocks.

Dipali
26th Jun 2008, 07:14 am
I tried it. while trying insert I saw the block '_detail callouts'. so i inserted it. than selcted it & went into block edit & moved all the entites to 0 layer. than saved the block so i could purge the layer 'asl_dim' but for hte block itself i am not able to purge it.

the alternative could be that you use 'wblock' & creat new drawing form your drawing. hopefully it will not have that block.

alijahed
26th Jun 2008, 07:21 am
I don't know what's happened to that block!!!!!
I attached the file again please try again on that one.


i PURGED and couldn´t get rid of ASL-DIM but I don´t see any blocks.

RobDraw
26th Jun 2008, 12:45 pm
Still no block. Just a viewport.

Dipali
26th Jun 2008, 12:52 pm
Still no block. Just a viewport.

As mentioned in my earlier reply above if you use insert command it will list that block & can insert it in the drawing. that block has text in _asl-dim layer, so can not delet that layer.
so after modifying the block i deleted the layer. but after deleting everything in the drawing still block can not be purged

LCE
26th Jun 2008, 12:54 pm
Do you want to know how to get rid of the block, or just to have the clean dwg?
If you want the clean dwg, then see attached.
As for how, vba.

RobDraw
26th Jun 2008, 03:33 pm
There is no block in the insert list when I open the drawing.

alijahed
26th Jun 2008, 11:19 pm
Thanks all,

LCE I really look forward to know how did you that I mean remove the block and cleanup the layer.
don't tell me you open a new drawing and save it in a.dwg :D

Cheers

Ali



Do you want to know how to get rid of the block, or just to have the clean dwg?
If you want the clean dwg, then see attached.
As for how, vba.

LCE
7th Jul 2008, 09:40 am
Ali,

I did this with a quick little vba. The code was something similar to below



Sub Test()
Dim blk as acadblock
For each blk in thisdrawing.blocks
If blk.name = "your block name" Then
blk.delete
end if
next
thisdrawing.purgeall
End Sub

Hope this helps.