Does anyone have a Lisp routine that will allow me to select an Xref or a Block Insert and then select multiple closed Plines as Boundaries?
Not a lisp, but I believe you can achieve this still using normal AutoCAD commands:
Create a region which represents the area you want to show. Then, you should be able to use this region to clip your xref or block.
Thanks for your reply. I'm using AutoCAD 2010 and XCLIP, IMAGECLIP, DGNCLIP, DWFCLIP & PDFCLIP all do not support Regioni object as Boundary. Does AutoCAD 2011 support Region as a Boundary for clipping?
Now that you mention it, I think the region method only works with AutoCAD 2011.
However, there is another way, and I just wrote a post on this very topic:
Hopefully this helps,
No, AutoCAD 2011 also doesn't support regions as boundaries for clipping. Regiion objects are only supported when creating pspace vports.
I'm aware of the method you mentioned in your post. Of course that method still only supports a single boundary and not multiple boundaries for clipping.
I actually ended up writing my own lisp routine to get AutoCAD to do mutliple boundaries for clipping Block Inserts, Xrefs, DWFs, DGNs, PDFs & Images. (see attached).
Hi Paul Li,
Thanks for your lisp file XClipM. Its working great.
With this lisp file we can select a single xref and then select multiple clip boundaries to clip it. Is it possible to change in a way that we can select multiple xrefs and select multiple clip boundaries?
I didn't get a notification of Riznas's request for multiple xref selections dated Feb of 2013 till today March of 2014. Autodesk is pretty slow with these notifications. Well, attached is the modified lisp file if Riznas is still interested. It still does not support circle shape plines as xclip boundaries even though AutoCAD allows you to select that since it's a pline. But that's an AutoCAD limitation. You can use the Express tool ClipIt which divides the arc into segments to do a circle shaped boundary clip. Enjoy!!!
This could probably be shortened by using the regular clip command, saving the "polyline boundary", and using a (foreach on a selection set list.
I'm sure there are many ways to make this lisp routine more efficient including the use of Visual Lisp functions. But I'll leave that to the experts.