Visual LISP, AutoLISP and General Customization

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

Xclip with Multiple Boundaries

3121 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
WilliamForty
Posts: 148
Registered: ‎06-26-2008
Message 2 of 9 (3,097 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 (3,082 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
WilliamForty
Posts: 148
Registered: ‎06-26-2008
Message 4 of 9 (3,065 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 (3,055 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
riznasp
Posts: 43
Registered: ‎02-18-2013
Message 6 of 9 (705 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

Valued Contributor pli
Valued Contributor
pli
Posts: 63
Registered: ‎11-19-2012
Message 7 of 9 (683 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: 457
Registered: ‎09-14-2010
Message 8 of 9 (673 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
Valued Contributor pli
Valued Contributor
pli
Posts: 63
Registered: ‎11-19-2012
Message 9 of 9 (669 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 familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

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

Ask the Community