how do i copy a selected area of a drawing (or delete all outside the selected area)?

how do i copy a selected area of a drawing (or delete all outside the selected area)?

PSharpKPQPX
Explorer Explorer
1,817 Views
10 Replies
Message 1 of 11

how do i copy a selected area of a drawing (or delete all outside the selected area)?

PSharpKPQPX
Explorer
Explorer

I'm trying to remove a 10,000sqM section of a complex (1800 layers) Hospital site plan dwg to upload to TS12 for marking out site features in this part of the site. I want to delete all items outside the rectangular select area (TRIM all outside box?). Please advise?

0 Likes
1,818 Views
10 Replies
Replies (10)
Message 2 of 11

h_s_walker
Mentor
Mentor

Use the command HIDEOBJECTS. See the following link AutoCAD 2022 Help | HIDEOBJECTS (Command) | Autodesk

I would first hide everything which is fully inside the red polyline.

Then any lines which cross over the polyline I would trim so they don't cross into the polyline area.

Then it's just a case of selecting everything else and deleting it.

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 3 of 11

PSharpKPQPX
Explorer
Explorer

cheers. unfortunately hiding all layers inside/outside the red box isn't an option; as i said there's 1800 layers >>> that's too time consuming. as is going through all the trimming of anything crossing the red box line, 1 by 1 or 1 group/block by 1. i need a simple, practical tool that enables a screenshot or select-and-delete-all-outside-box action (while maintaining all properties of items remaining in red box obviously). 
I'd assume with 2024 tech and 30 years AC development this should be easily available, but doesn't seem so?

0 Likes
Message 4 of 11

h_s_walker
Mentor
Mentor

It's not hiding layers, its hiding objects which are inside the red polyline. Post your drawing if you have problems

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 5 of 11

paullimapa
Mentor
Mentor

Try these steps:

Command: _.Select

_C

pick the lower left and the upper right corners of your red box area

hit Enter to complete the command

This saves all those objects as a selection set. Then 

Command: _.Erase

_All

_R

_P

hit Enter to complete the command. 

Assuming you don’t have any Locked layers this process should remove most of the objects outside of the red rectangle. Then it’s a matter of using the _.Trim command to get rid of the rest of the objects assuming they are not made of Blocks that happen to cross over the red line. But this should get you closer to what you want to end up with. Finally use the _.SaveAs command to create a new dwg with these changes. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 11

pendean
Community Legend
Community Legend

WBLOCK command, use the crossing window to select only what you wish to keep (include your rectangle), this creates a new DWG file with only that content. Go into that new DWG file and TRIM anything outside your rectangle.

 

Done.

 

If it take you more than 2-minutes you probably need a double-cappuccino and a donut @PSharpKPQPX  🙂

 

HTH

Message 7 of 11

PSharpKPQPX
Explorer
Explorer

Cheers, got the donuts but this dwg isn't WBLOCKing. Click, sweep right or left to select desired area (highlighted in white box in attached) highlights most of the whole dwg's layers (of 1000+ #) for the block formation. Is there a way to just isolate all inside a select rectangle/window/etc?

tks

0 Likes
Message 8 of 11

PSharpKPQPX
Explorer
Explorer

unfortuantely i can't post the dwg due to GDPR on this Tier 1, Government Job. I've attached a snapshot of the white box highlighting the area to be isolated, but unsure if a jpeg is any use. ..more an FYI.

Cheers

0 Likes
Message 9 of 11

PSharpKPQPX
Explorer
Explorer

unfortuantely i can't post the dwg due to GDPR on this Tier 1, Government Job. I've attached a snapshot of the white box highlighting the area to be isolated, but unsure if a jpeg is any use. ..more an FYI.

Cheers

0 Likes
Message 10 of 11

pendean
Community Legend
Community Legend

@PSharpKPQPX wrote:

Cheers, got the donuts but this dwg isn't WBLOCKing....


SAVEAS command, create e a new file, is the longer way to do tat then.

 


@PSharpKPQPX wrote:

...Is there a way to just isolate all inside a select rectangle/window/etc?

tks


Not a feature of the program: TRIM and ERASE commands are going to be the tools to use. But start with:

Select all in the drawing and then hold the shift key down while drawing a crossing-window selection around desired geometry you wish to keep. Hit the Delete key to remove the extraneous elements, leaving only what is desired

 

If you are running LT2024 you could experiment to see if the LISPs here can speed up the process

https://draftsperson.net/lisproutines/trims.zip

pendean_0-1710768423015.png

 

Also is attached another LISP I stumbled across while looking for the above LISPs. Not sure it will work in LT2024 but you can find out quickly.

0 Likes
Message 11 of 11

h_s_walker
Mentor
Mentor

Yes it seems to work in LT2024

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes