Visual LISP, AutoLISP and General Customization

Reply
Active Contributor pli
Active Contributor
pli
Posts: 32
Registered: ‎04-25-2008
Message 1 of 9 (2,687 Views)

Xclip with Multiple Boundaries

2687 Views, 8 Replies
12-01-2010 04:14 PM

Hi,

 

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?

 

 


Paul Li
Senior Associate
ALTOON PARTNERS LLP
Los Angeles • Amsterdam • Shanghai • Hong Kong • Moscow
444 South Flower Street • 48th Floor • Los Angeles • California • 90071-2901
D +1 213 225 1944 • T +1 213 225 1900 • www.altoonpartners.com


Distinguished Contributor
Posts: 148
Registered: ‎06-26-2008
Message 2 of 9 (2,663 Views)

Re: Xclip with Multiple Boundaries

12-02-2010 01:23 AM in reply to: pli

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.

 

Regards

Active Contributor pli
Active Contributor
pli
Posts: 32
Registered: ‎04-25-2008
Message 3 of 9 (2,648 Views)

Re: Xclip with Multiple Boundaries

12-02-2010 09:00 AM in reply to: WilliamForty

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?


Paul Li
Senior Associate
ALTOON PARTNERS LLP
Los Angeles • Amsterdam • Shanghai • Hong Kong • Moscow
444 South Flower Street • 48th Floor • Los Angeles • California • 90071-2901
D +1 213 225 1944 • T +1 213 225 1900 • www.altoonpartners.com


Distinguished Contributor
Posts: 148
Registered: ‎06-26-2008
Message 4 of 9 (2,631 Views)

Re: Xclip with Multiple Boundaries

12-03-2010 03:03 AM in reply to: pli

Hi,

 

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:

 

http://howtoautocad.com/clipping-with-multiple-boundaries/

 

Hopefully this helps,

 

Regards,

Active Contributor pli
Active Contributor
pli
Posts: 32
Registered: ‎04-25-2008
Message 5 of 9 (2,621 Views)

Re: Xclip with Multiple Boundaries

12-03-2010 08:49 AM in reply to: WilliamForty

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).


Paul Li
Senior Associate
ALTOON PARTNERS LLP
Los Angeles • Amsterdam • Shanghai • Hong Kong • Moscow
444 South Flower Street • 48th Floor • Los Angeles • California • 90071-2901
D +1 213 225 1944 • T +1 213 225 1900 • www.altoonpartners.com


Active Contributor
Posts: 37
Registered: ‎02-18-2013
Message 6 of 9 (271 Views)

Re: Xclip with Multiple Boundaries

03-19-2014 02:13 AM in reply to: pli

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?

 

Thanks

Riznas

Active Contributor pli
Active Contributor
Posts: 36
Registered: ‎11-19-2012
Message 7 of 9 (249 Views)

Re: Xclip with Multiple Boundaries

03-20-2014 09:53 AM in reply to: riznasp

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!!!

Paul Li
Senior Associate
ALTOON PARTNERS LLP
Los Angeles • Amsterdam • Shanghai
617 West 7th Street • Suite 400 • Los Angeles • California • 90017-3889
D +1 213 225 1944 • T +1 213 225 1900 • www.altoonpartners.com
Valued Mentor
gccdaemon
Posts: 444
Registered: ‎09-14-2010
Message 8 of 9 (239 Views)

Re: Xclip with Multiple Boundaries

03-20-2014 03:52 PM in reply to: pli

This could probably be shortened by using the regular clip command, saving the "polyline boundary", and using a (foreach on a selection set list.

Andrew Ingram

Civil 3D x64 2012
Win 7 x64 Ultimate
I7 3820 (3.6ghz quad core with HT)
32gig RAM (Corsair XMS3 4x8g)
Intel x z79 mobo (BOXDX79TO 2011 socket)
Radeon HD 7850 2gb GDDR5
Active Contributor pli
Active Contributor
Posts: 36
Registered: ‎11-19-2012
Message 9 of 9 (235 Views)

Re: Xclip with Multiple Boundaries

03-20-2014 04:22 PM in reply to: gccdaemon

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.

Paul Li
Senior Associate
ALTOON PARTNERS LLP
Los Angeles • Amsterdam • Shanghai
617 West 7th Street • Suite 400 • Los Angeles • California • 90017-3889
D +1 213 225 1944 • T +1 213 225 1900 • www.altoonpartners.com

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community