Ok, so more and more I have been finding that many of my users are placing stuff outside the title block.
So my challenge is to erase anything that is outside the title block.
Here are the requirements:
- The title block is always in PaperSpace
- The title block and nothing inside the boundaries of the title block can get deleted.
- If something is even only partially outside the boundaries title block, it must get deleted.
- The title block will generally always have the same name, but will occasionally have a different name, so an option should be provided if it does.
- Some drawings may have more than one Layout tab in the same file, so if there is more than one layout tab, all layout tabs must be processed.
- That being said, if a Layout tab is not initialized (i.e. the drawing was based off the default template and the Layout2 tab has not been used). It should not be processed. Better still, it should be deleted if not initialized.
- Some projects may have different title blocks on different tabs within the same file. I would love to see this get handled as well.
I have attached my entry into this challenge, but I do not know how to check if a layout is initialized yet or not, so that part is not there.
Also, if you can make it automatically run every time the file gets saved, that is cool too, but not necessary.
Edit: I found a couple of bug in my routine, I have posted a new version.