Author Topic: Erase Outside Title Block  (Read 4624 times)

0 Members and 1 Guest are viewing this topic.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Erase Outside Title Block
« Reply #15 on: July 28, 2021, 12:46:51 PM »
I still think this is doable no VL.


Ok, but how would I get the boundary of the title block without VL? Keep in mind, the title block can be any size from 8.5x11 to I believe our largest is 48x52 and all are named identically and there isn't always a box around them and going back and modifying them isn't an option.

I also have a ton of stuff in paperspace that has to stay, so I can't just erase everything outside the moved title block.
I understand the OCD of not wanting to have stuff outside of the titleblock .. I have it too.  :-D If you plot to VIEW you don't have to worry about the stuff outside though. I've never seen files that have been 'corrupted' from having stuff outside of plotting extents?

Unfortunately, that assumes that view is always setup correctly, which isn't always the case. If it were just me working on drawings, it wouldn't be a big deal, I could ensure that everything is setup correctly, but I am a single CAD manger trying to support and manage 73 AutoCAD users at present, across two countries. As a result, I pretty much need to do everything I can to idiot proof things.

And unfortunately, upper management often makes this even worse when they insist on hiring people that don't know AutoCAD at all (because they are good with the engineering) and expects that we can train them overnight in how to use AutoCAD, I keep trying to tell them it doesn't work that way.

So again, I am left with idiot proofing these things and even the page layouts aren't always setup correctly for plotting, so I can't just use layout, extents really is the ideal choice after a lot of extensive testing.

As far as corruption, we have had some drawings be corrupted due to objects (generally AEC objects, which is another pain point) outside the plotting extents and if you can get the file opened and move them back within the plotting extents, the file is fine.

BIGAL

  • Swamp Rat
  • Posts: 1398
  • 40 + years of using Autocad
Re: Erase Outside Title Block
« Reply #16 on: July 29, 2021, 12:36:10 AM »
Company standards comes to mind sounds like that is your first step.
A man who never made a mistake never made anything

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Erase Outside Title Block
« Reply #17 on: July 29, 2021, 10:37:46 AM »
I still think this is doable no VL.


Ok, but how would I get the boundary of the title block without VL? Keep in mind, the title block can be any size from 8.5x11 to I believe our largest is 48x52 and all are named identically and there isn't always a box around them and going back and modifying them isn't an option.

I also have a ton of stuff in paperspace that has to stay, so I can't just erase everything outside the moved title block.
I understand the OCD of not wanting to have stuff outside of the titleblock .. I have it too.  :-D If you plot to VIEW you don't have to worry about the stuff outside though. I've never seen files that have been 'corrupted' from having stuff outside of plotting extents?

Unfortunately, that assumes that view is always setup correctly, which isn't always the case. If it were just me working on drawings, it wouldn't be a big deal, I could ensure that everything is setup correctly, but I am a single CAD manger trying to support and manage 73 AutoCAD users at present, across two countries. As a result, I pretty much need to do everything I can to idiot proof things.

And unfortunately, upper management often makes this even worse when they insist on hiring people that don't know AutoCAD at all (because they are good with the engineering) and expects that we can train them overnight in how to use AutoCAD, I keep trying to tell them it doesn't work that way.

So again, I am left with idiot proofing these things and even the page layouts aren't always setup correctly for plotting, so I can't just use layout, extents really is the ideal choice after a lot of extensive testing.

As far as corruption, we have had some drawings be corrupted due to objects (generally AEC objects, which is another pain point) outside the plotting extents and if you can get the file opened and move them back within the plotting extents, the file is fine.
Sounds like you have your hands full! Have you thought about processing these files with ODBX ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Erase Outside Title Block
« Reply #18 on: July 29, 2021, 11:29:18 AM »
Company standards comes to mind sounds like that is your first step.
Hey, we are a far cry better than it used to be, I will take the baby steps, at least I have number bubbles in reference and general notes lining up and sheet indexes reflecting the correct deltas, etc.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Erase Outside Title Block
« Reply #19 on: July 29, 2021, 11:31:39 AM »
I still think this is doable no VL.


Ok, but how would I get the boundary of the title block without VL? Keep in mind, the title block can be any size from 8.5x11 to I believe our largest is 48x52 and all are named identically and there isn't always a box around them and going back and modifying them isn't an option.

I also have a ton of stuff in paperspace that has to stay, so I can't just erase everything outside the moved title block.
I understand the OCD of not wanting to have stuff outside of the titleblock .. I have it too.  :-D If you plot to VIEW you don't have to worry about the stuff outside though. I've never seen files that have been 'corrupted' from having stuff outside of plotting extents?

Unfortunately, that assumes that view is always setup correctly, which isn't always the case. If it were just me working on drawings, it wouldn't be a big deal, I could ensure that everything is setup correctly, but I am a single CAD manger trying to support and manage 73 AutoCAD users at present, across two countries. As a result, I pretty much need to do everything I can to idiot proof things.

And unfortunately, upper management often makes this even worse when they insist on hiring people that don't know AutoCAD at all (because they are good with the engineering) and expects that we can train them overnight in how to use AutoCAD, I keep trying to tell them it doesn't work that way.

So again, I am left with idiot proofing these things and even the page layouts aren't always setup correctly for plotting, so I can't just use layout, extents really is the ideal choice after a lot of extensive testing.

As far as corruption, we have had some drawings be corrupted due to objects (generally AEC objects, which is another pain point) outside the plotting extents and if you can get the file opened and move them back within the plotting extents, the file is fine.
Sounds like you have your hands full! Have you thought about processing these files with ODBX ?
I actually already do some processing with OBX, not sure how I would do this using OBX though, but that would be awesome.

BIGAL

  • Swamp Rat
  • Posts: 1398
  • 40 + years of using Autocad
Re: Erase Outside Title Block
« Reply #20 on: August 02, 2021, 12:40:10 AM »
There is some good posts around about creating company standards what to look for do a google, sounds like the 1st step, new employee here is our rules you must use. Maybe forums/autodesk.

I previously had some interesting input from a Cad manager multi millions $$ project 200 + building sites revamp of corporate appearance the Cad manager removed the standard menu and replaced with a custom one that had draw objects, not lines, so always correct, that was a outsourced project to a cheaper country where he went to live for 6 months to ensure company standards.
A man who never made a mistake never made anything

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Erase Outside Title Block
« Reply #21 on: August 04, 2021, 12:29:31 PM »
There is some good posts around about creating company standards what to look for do a google, sounds like the 1st step, new employee here is our rules you must use. Maybe forums/autodesk.

I previously had some interesting input from a Cad manager multi millions $$ project 200 + building sites revamp of corporate appearance the Cad manager removed the standard menu and replaced with a custom one that had draw objects, not lines, so always correct, that was a outsourced project to a cheaper country where he went to live for 6 months to ensure company standards.
Again, we have CAD Standards, that isn't the issue, unfortunately, not everyone follows the CAD standards all of the time, even though they know the rules. I try my best to enforce them, but I can only do so much. Simply put, this is NOT about our CAD Standards, but how to deal with people drawing outside of title blocks. We also run into this issue with files sent to us from other companies that we have to use as xrefs and that also causes a lot of issues, so having a handy way to clean it up rapidly is worthwhile.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Erase Outside Title Block
« Reply #22 on: August 04, 2021, 06:52:05 PM »
How can you rely on a layer filter for your titleblocks if users are unruly? There could be other items on that layer too?
Code: [Select]
(setq SS (ssget "_X" (list '(0 . "INSERT") '(8 . "$TB") (cons 410 tab))))
« Last Edit: August 05, 2021, 10:00:21 AM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Erase Outside Title Block
« Reply #23 on: August 05, 2021, 10:37:58 AM »
Here's a start of some code that could be adapted for ODBX. Enjoy!
Code - Auto/Visual Lisp: [Select]
  1. (defun c:cleanlayout (/ a b e r ll tb ur x1 x2 y1 y2)
  2.   ;; RJP » 2021-08-05
  3.   ;; Deletes all objects not found within extents of titleblock on all paperspace tabs
  4.   (if (and (setvar 'tilemode 0)
  5.            (setq e (car (entsel "\nPick titleblock to keep: ")))
  6.            (= "INSERT" (cdr (assoc 0 (entget e))))
  7.            (setq e (cdr (assoc 2 (entget e))))
  8.       )
  9.     (progn
  10.         (cond ((and (= -1 (vlax-get b 'islayout)) (not (wcmatch (vlax-get b 'name) "`*Model*")))
  11.                (setqnil
  12.                      tb nil
  13.                )
  14.                (vlax-for a b
  15.                  (vla-getboundingbox a 'll 'ur)
  16.                  (mapcar 'set '(ll ur) (mapcar 'vlax-safearray->list (list ll ur)))
  17.                  (if (and (vlax-property-available-p a 'name) (wcmatch (vla-get-name a) e))
  18.                    (setq tb (list ll ur))
  19.                    (or (= "AcDbViewport" (vla-get-objectname a)) (setq r (cons (list ll ur a) r)))
  20.                  )
  21.                )
  22.                (if tb
  23.                  (progn (setq x1 (caar tb)
  24.                               x2 (caadr tb)
  25.                               y1 (cadar tb)
  26.                               y2 (cadr (cadr tb))
  27.                         )
  28.                         (foreach o r
  29.                           (setq a (mapcar 'car (list (car o) (cadr o))))
  30.                           (setq b (mapcar 'cadr (list (car o) (cadr o))))
  31.                           (or (and (apply '<= (list x1 (car a) (cadr a) x2))
  32.                                    (apply '<= (list y1 (car b) (cadr b) y2))
  33.                               )
  34.                               (vla-delete (caddr o))
  35.                           )
  36.                         )
  37.                  )
  38.                )
  39.               )
  40.         )
  41.       )
  42.     )
  43.   )
  44.   (princ)
  45. )
« Last Edit: August 06, 2021, 01:00:51 PM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC