Searching the blocks for a specific layer i want to purge

Searching the blocks for a specific layer i want to purge

Peac3
Advocate Advocate
2,012 Views
13 Replies
Message 1 of 14

Searching the blocks for a specific layer i want to purge

Peac3
Advocate
Advocate

Hi basically, i am importing an architect drawing into our master floor plan. And I am having some troubles finding 2 layers, i suspect, hidden somewhere in a bloc.

 

Is there a way in Autocad 2013 to know into which block the line is in? it's associated to what? so i can bedit the bloc and change it to layer 0 ?

 

I wonder if there is an existing built in tool for that.

Thanks.

 

0 Likes
Accepted solutions (1)
2,013 Views
13 Replies
Replies (13)
Message 2 of 14

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

you might save the drawing to DXF and search in the DXF for that layers and so for entities using them.

You might also upload the dwg-file and tell us which layers you are looking for, there are tools that can make that more easy.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 14

Peac3
Advocate
Advocate

Hello this is the .dwg, and fully exploded 5 times in a row. The 2 layers are still there but associated with no apparent objects.

 

17186_X_PLAN-INT$0$10-AMEUBLEMENT

17186_X_PLAN-INT$0$101-MOBILIER-FIXE

 

0 Likes
Message 4 of 14

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

within the drawing there are some objects marked as hidden (which can not be done by a user, most probably an application is running on your system or at least on the system that modified this dwg-file).

 

I have attached the drawing with these objects not hidden any more ... and these blocks are sitting/contains the layers you were looking for.

You can now use command _QSELECT to select all objects on layer "17186_X_PLAN-INT$0$101-MOBILIER-FIXE", then delete the selected blocks and run command _PURGE multiple times.

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 14

Kent1Cooper
Consultant
Consultant

If you know you want to get rid of whatever it is/they are anyway, just use LAYDEL.  It will dump them even from within Block definitions, and dump the Layer itself.

Kent Cooper, AIA
0 Likes
Message 6 of 14

gotphish001
Advisor
Advisor
Accepted solution

I wasn't sure what was going on. I got the blocks to be selected with qselect and those layers. I still couldn't see them but it said I had 28 blocks selected in properties. I used move command and moved them over a big distance like 2000 meters. I still couldn't see them, but I knew they were no were near the building. I then selected the entire building and wblocked it. Those layers where not in the new dwg.



Nick DiPietro
Cad Manager/Monkey

0 Likes
Message 7 of 14

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I still couldn't see them

They are set to be invisible (a flag that applications can set to entities), if you look to my drawing I changed that flag.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 8 of 14

Peac3
Advocate
Advocate

That's very interesting, Qselect, first time I use that command, very useful has well has laydel, that's a true weapon of mass destruction LOL.

 

But how can I locate these hidden objects? there is a solution to select them and move them away.. (while they are invisible) but it would actually be nice to be able to change the flag to set it to "visible" instead of hidden.

 

it's not possible for me to do that with autocad 2013 ?

 

 

 

0 Likes
Message 9 of 14

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> But how can I locate these hidden objects?

You need to write a small tool which changes this flag, there is no option to do that with standard AutoCAD commands.

But I have attached a drawing in my previous post where these objects are turned on.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 10 of 14

Peac3
Advocate
Advocate

You need to write a small tool which changes this flag, there is no option to do that with standard AutoCAD commands.

But I have attached a drawing in my previous post where these objects are turned on.

 

yes yes and thank you for that, I looked at it but this drawing can't be used because it was exploded,  many layers are mixed on layer 0... it's good to know where the hidden objects are has in your AN01 revision. I can't do anything about it in the good drawing.

 

Obviously I am unable to write a tool to change the flag..

0 Likes
Message 11 of 14

Peac3
Advocate
Advocate

Nick DiPietro

 

I will try your solution, moving the hidden objects right now. I had no success doing it yet maybe because of a Qselect configuration issue.

0 Likes
Message 12 of 14

pendean
Community Legend
Community Legend
LAYMRG the offending layers with layer 0 (or DEFPOINTS), move on with your day.
Oldest trick around.


0 Likes
Message 13 of 14

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> but this drawing can't be used because it was exploded

Do you have VBA enabler installed? If so that's the code:

 

Public Sub makeVisible
   Dim tBl as AcadBlock
   Dim tEnt as AcadEntity

   For Each tBl in ThisDrawing.Blocks
      For Each tEnt in tBl
         if not tEnt.Visible then tEnt.Visible = true
      Next
   Next

End Sub

(not tested now, only typed in here, let me know if you get an exception or error)

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 14 of 14

Peac3
Advocate
Advocate

LAYMRG the offending layers with layer 0 (or DEFPOINTS), move on with your day.
Oldest trick around.

 

I will put 2 hours in formation for that honestly, my colleague are going on formation much much more then me. This is totally useless to spend the formation budget but the important thing is that I am getting better at something (But without spending the budget lol)

 

This hidden object situation is a very old problem I have, and for the first time, I get some good solution to do something about it.

 

I will try your solution with LAYMRG tomorrow, that's another command I was not aware of.. it's time well spent.

 

Alfred, I'll look at the code tomorrow too.. I don't even know how to incorporate it in AutoCAD. Same thing with the VBA question, right now, I don't have a clue.  But thanks, I want to give it a shot.

 

0 Likes