Invisible blocks in the thousands causing issue

Invisible blocks in the thousands causing issue

Anonymous
Not applicable
11,929 Views
53 Replies
Message 1 of 54

Invisible blocks in the thousands causing issue

Anonymous
Not applicable

Hello,

 

I am currently getting .dwg files from architects that seems to include invisible blocks. These blocks from some architects seem to number in the 16,000's, while the largest mass of them that I have gotten was around 116,386 instances of them.

I have gone through some of them and found the blocks using a QSelect and selecting them by name and then deleting them one by one. Even with nothing else in the drawing, having this block in the drawing causes a stuttering on my machines. (Some of which are spec'd way beyond what a drafter would need)

 

Today, while dealing with one of these drawings, I decided to peak inside the block. There was oddly another block named "DIMSET" (Going to try to upload a stripped out version of it)

This is interesting, because DIMSET shouldn't be causing this stuttering and there is nothing else in the drawing.

Anyone know how to cause the stuttering to stop? In the attached file the block is called "Setup", but in other files it could be a number of things. Sometimes they reference the architect's local drive.

I have tried to ask the client to get the architects to stop leaving these annoying blocks in, but they seem to refuse. If I mass select them and delete them, the stuttering stops.

What is causing this? Besides having them stripped, how do I fix the stuttering?

0 Likes
11,930 Views
53 Replies
Replies (53)
Message 21 of 54

cadffm
Consultant
Consultant

Autodesk Architecture 

Or another vertical with the ROOM feature

Sebastian

0 Likes
Message 22 of 54

stork91
Contributor
Contributor

@jggerth  I have a call out to one of the architects specifically for that. They haven't gotten back to me yet. Guessing the reason later will be, "Rona"

0 Likes
Message 23 of 54

pendean
Community Legend
Community Legend

Tested in R2019 and R2021 here, nothing special, but I am fully updated to R2019.1.2 version. I did use THIS to clean up the files (our stock workflow when we receive files from outside) as well as the core WBLOCK command to manually select only what was on screen that I wanted to salvage (I used a crossing window selection to see if those objects got picked up, I even zoomed out to where those lines were barely visible and windowed across the screen) to compare results, they seem about the same. See attached.

 

I suspect your file senders have no idea what the issue really is either and can't fix it for you, let us know what you find out.

 

HTH

0 Likes
Message 24 of 54

s.borello
Advisor
Advisor

All I see is a line in your posted drawing... not sure what you're talking about. 

Message 25 of 54

stork91
Contributor
Contributor

@pendean 

Yeah... I think I am just going to have to write a script to erase everything but what is able to be selected. 😞

@s.borello 

Hence the title of the post. "Invisible blocks"
Also, I have given detailed instructions on how to select the objects, as you cannot simply click them.

0 Likes
Message 26 of 54

cadffm
Consultant
Consultant

But the Blockreferences are not invisible, just the Blocks are empty.

 

Use a tool to delete all blockreferences without attributes if the block is empty.

This is the save way and delete enough to solve your issue.

And you don't need to know the block names, such blocks are useless for you(Autocad).

 

I would like to know for what they are created and used in Architecture/Room data.

(Extendet datas on these object with the hint to ACA Rooms)

Sebastian

Message 27 of 54

stork91
Contributor
Contributor

@cadffm Fair point. "Blocks appear to be invisible as they are not visible to the eye." - Would make for a more accurate title, but ... If something is there but not visible... nvm.

Interesting idea to select the block without attributes. Could conflict if there are block with text or if an architect sends something that has text as a block. (No idea why, but some do that. Idjiots gotta idjiot. 🤣)

I have actually wondered about ACA being the cause of this... But then I would need elevate this to a big issue.

0 Likes
Message 28 of 54

cadffm
Consultant
Consultant

Interesting idea to select the block without attributes.

 

 

 

Delete blockreferences without attributs

of EMPTY Blocks.

This way you loosing nothing, but your problem.

Sebastian

Message 29 of 54

stork91
Contributor
Contributor

@cadffm the question then becomes, how does one select blocks without attributes?

Not something I am familiar with

0 Likes
Message 30 of 54

cadffm
Consultant
Consultant

You can use SSX with option FLAG to do this,

but you need to select blockreferences without attributes, for empty blocks only 

and this is not possible without programming, sorry.

But test SSX FLAG to learn new things, also when it isn't a solution for your problem.

 

You can also add the three Blocknames as filter too.

 

By this way you can select alle unnested blockreferences of Block 1,2,3 if no attributes attached.

 

I am pretty sure these three blocks are every time empty(and useless),

so SSX (available if EXPRESSTOOLS installed) is not so perfect, it can not check a block for Content or Empty, but a solution you can handle on your own.

Otherwise you need help

Sebastian

0 Likes
Message 31 of 54

RobDraw
Mentor
Mentor

I think the best suggestion is to extract what you need and leave the garbage behind. It may require several targeted steps but gives you a lot of control of the end result.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 32 of 54

dbroad
Mentor
Mentor

I read through the thread and opened the drawing. The example has a lot of insertions of setup and dimset.  I wblocked setup out and the only thing it contained was the layer dims and the dimstyle dot with an override of dimscale=1. That dimstyle contained the block definition dot which is another block.  I don't know how the block was replicated to the extent that it is but nested blocks can be deleted from the drawing by using the various suggestions in the thread.

  1. Assuming that the drawing is entirely in model space, you could use the following process.
    • Ensure all layers are thawed, on, and unlocked.
    • Select all actual graphics by using SELECT W (getvar "extmin")(getvar "extmax").  That selection won't find any of your invisible blocks because they don't contain any graphic elements. 
    • Use wblock objects to create a copy of the current drawing without any bloating elements.
    • Exit the drawing, delete it and rename the wblocked drawing to the bloated drawing.
  2. Delete and purge using the following process:
    • Qselect block references named setup.
    • Delete the selection
    • Purge that block definition.
    • Qselect block references named dimsets.
    • Delete the selection
    • Purge that block definition.
    • Save the drawing.
  3. Create a custom lisp to solve the problem similar to.
    1. (DEFUN delete-purge (blocks)
        (VLAX-FOR blk
      		(VLA-GET-BLOCKS
      		  (VLA-GET-ACTIVEDOCUMENT
      		    (VLAX-GET-ACAD-OBJECT)
      		  )
      		)
          (VLAX-FOR i	blk
            (IF (AND
      	    (= "AcDbBlockReference" (VLA-GET-OBJECTNAME i))
      	    (MEMBER (VLA-GET-NAME i) blocks)
      	  )
      	(VLA-DELETE i)
            )
          )
        )
         (FOREACH n blocks
          (COMMAND "purge" "blocks" n "n")
        )
        (PRINC)
      )
      
      ;;An example invocation.  Warning - very dangerous if used indiscriminately.
      (delete-purge '("setup" "DIMSET"))
      
      ;;Save this file as delete-purge.lsp and load it with the following (commented out here)
      ;;(load "delete-purge")
      ;;D. C. Broad, Jr.  6/26/2020

To keep it from happening, communicate with your team and explain how these blocks aren't helping anything and that their use is detrimental.  

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 33 of 54

stork91
Contributor
Contributor

@dbroad all of that relies on

  1. I know what the name of the block is 
    (Spoiler: I don't and it isn't always named "setup")
  2. "My team" being the one doing this. It isn't. They come from Architects outside of the company.

@dbroad wrote:

I read through the thread and opened the drawing.  


I really don't understand what I am saying in the previous posts that makes what I am saying so difficult to understand. Really, I don't. I have been clear throughout all of this that the blocks in question are not always named setup and that the drawings come from 4 different architects. Yet, some how, for some reason, the vast majority of replies to this thread are trying to tell me to either select the block, "Setup" and delete it, or they are trying to tell me to use WBLOCK which relies entirely on me knowing the name of the block.

Please, someone explain to me what I am saying that is making this so difficult to understand... I mean, I speak 3 languages, would saying this in Spanish or Korean make it easier to understand?

 


@dbroad wrote:

I read through the thread and opened the drawing. The example has a lot of insertions of setup and dimset.  I wblocked setup out and the only thing it contained was the layer dims and the dimstyle dot with an override of dimscale=1. That dimstyle contained the block definition dot which is another block.  I don't know how the block was replicated to the extent that it is but nested blocks can be deleted from the drawing by using the various suggestions in the thread.

  1. Assuming that the drawing is entirely in model space, you could use the following process.
    • Ensure all layers are thawed, on, and unlocked.
    • Select all actual graphics by using SELECT W (getvar "extmin")(getvar "extmax").  That selection won't find any of your invisible blocks because they don't contain any graphic elements. 
    • Use wblock objects to create a copy of the current drawing without any bloating elements.
    • Exit the drawing, delete it and rename the wblocked drawing to the bloated drawing.
  2. Delete and purge using the following process:
    • Qselect block references named setup.
    • Delete the selection
    • Purge that block definition.
    • Qselect block references named dimsets.
    • Delete the selection
    • Purge that block definition.
    • Save the drawing.

None of these steps work because they are all reliant on knowing the names of the block.

 

I DO NOT KNOW THE NAMES OF ALL OF THE BLOCKS RELATED TO THE PROBLEM AND I WOULD NEED TO SPEND AN HOUR OR MORE FINDING THEM.

Understand I am not frustrated with you @dbroad , but the general lack of care at reading what I have already written a few times is somewhat infuriating. 

Code is likely the solution to this problem, unfortunately I am likely going to be limited to:

  1. Having the code select everything visually from (-1000',-1000') to (1000',1000')
  2. Copying everything selected with a base point of (0,0)
  3. Deleting everything selected. (Note, the "Blocks not shown graphically" (Re: Invisible) will not be deleted)
  4. Selecting everything in the drawing: SELECT ALL
  5. Deleting everything selected
  6. Pasting everything at (0,0)

Message 34 of 54

dbroad
Mentor
Mentor

Sorry you are dissatisfied. Without knowing block names, you can't use a code solution.  However, I proposed 2 other solutions. Another solution is to work with different architects.  If you're working with them or for them, your on their team. Don't mince words.  I've never used empty blocks and don't know any other architects that do.  I'll be sure to avoid helping you in the future so that you won't be stressed out.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 35 of 54

stork91
Contributor
Contributor

@dbroad , I have repeated myself every time I have relied to a new user.

I appreciate the help.

 

I have continued to work on the problem from my end and am more frustrated that this does in fact appear to be an ACA issue. (And I have been dealing with it for months) Even more so that the problem seems to be a "feature" that results in a memory issue. One of the largest from what I can tell with AutoCAD.

I apologize, sincerely. I really do. And if I never see any help from you in here again, just know that I appreciated it and the code snippet. There are some things from there that I can glean from it for the final code, which I plan on sharing in here for future use.

0 Likes
Message 36 of 54

Kent1Cooper
Consultant
Consultant

@stork91 wrote:

.... or they are trying to tell me to use WBLOCK which relies entirely on me knowing the name of the block. ....



You appear to be misunderstanding what people are suggesting with WBLOCK.  It does not require knowing the name(s) of the invisible Block(s).  It is to use the command to write off all the pieces you want to keep, to another drawing, which should leave the invisible Blocks [and anything else you don't select] out of the resulting new drawing.  Then use that new drawing, rather than the source drawing.

Kent Cooper, AIA
Message 37 of 54

stork91
Contributor
Contributor

@Kent1Cooper 

Curious, how would I do that without using a mouse? The problem is that some of the DWGs I am getting are stuttering so bad that even trying to select the things visually with the blue or green boxes makes anything nearly impossible.

I am assuming that there is some code I could run without the GUI to do this, and it would make the process possible without the aid of medication. (Seriously... pretty bad.)

I won't be able to get to the problem until this weekend or next week, but currently looking at doing a setq for the previously proposed steps I was referring to.

0 Likes
Message 38 of 54

RobDraw
Mentor
Mentor

@stork91 wrote:

the general lack of care at reading what I have already written a few times is somewhat infuriating. 



 

Infuriating? If it upsets you that much, you should probably stay away from the forums. It happens all the time.

 

You need to remember that you have come across a unique situation and they are trying to give you what you want. Don't get mad at them or they will walk away. 

 

I still think you are going about this the wrong way. You are trying to hit a moving target using code. Not the easiest thing to do. You haven't even tried what could be the solution. [start sarcasm] I'm infuriated that you haven't even acknowledged it yet. [end sarcasm] Extract the stuff you want and leave the garbage behind.

 

If that, or the other suggestions, isn't good enough for you. You've got some tough work in front of you. You are going to need to know what is causing the problem and possibly instruct the senders on how to prevent it. Not always received well and not always an easy task.

 

My best guess is that they are on another platform and not exporting properly. Someone already mentioned that they may even realize that what they are doing is casing you problems. You could try using Drawing TrueView to convert the files to a usable state.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 39 of 54

cadffm
Consultant
Consultant

...Curious, how would I do that without using a mouse?

 

By using the commandline version, this command start also if you use WBLOCK in a Script,Makro or (send-)commands.

 

Working by hand you can start command: -WBLOCK

Are you able to do the rest?

 

But i preffer the SSX way 

Sebastian

0 Likes
Message 40 of 54

stork91
Contributor
Contributor

@RobDraw ... I honestly wrote a pretty snarky and sarcastic response but have deleted it.

I am sorry that I have gotten upset at the answers given as they have not addressed the issue.

You're right, it is a VERY moving target. It would be nice to get the architects to solve this issue... but LOL... yeah, that's not going to happen. If you think my responses are bad... One company, literally while on the phone with a client, dropped a price for "fixing it"... per project.