Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Xclip with Multiple Boundaries

14 REPLIES 14
Reply
Message 1 of 15
paul_li
26422 Views, 14 Replies

Xclip with Multiple Boundaries

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


14 REPLIES 14
Message 2 of 15
WilliamForty
in reply to: paul_li

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

Message 3 of 15
paul_li
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


Message 4 of 15
WilliamForty
in reply to: paul_li

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,

Message 5 of 15
paul_li
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


Message 6 of 15
riznasp
in reply to: paul_li

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

Message 7 of 15
paullimapa
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
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 8 of 15
gccdaemon
in reply to: paullimapa

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 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
Message 9 of 15
paullimapa
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
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 10 of 15
blair_chambers
in reply to: paullimapa

Can I get the instructions on using the XClipM.lsp?

 

Thank You

 

Message 11 of 15

I would love the instructions as well as I can't seem to get this to work.  Loaded the lisp and the command "xclipm" works...just don't know what to do after this.

Message 12 of 15
paullimapa
in reply to: rjbrittain11

The routine is supposed to allow you to select an xref and then multiple pre-drawn closed plines that you want to use as clipping boundaries.

When the routine completes you will have multiple xrefs left that are clipped based on the selected closed plines boundaries.

At least that was the point when I wrote it back then to fulfill my wishlist.

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales |Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 13 of 15
Pkolluru
in reply to: paullimapa

The command is exactly what I was looking for, but it seems to limited on how many polylines it can select.

 

Giving me a message in the command bar that that says something along the lines of 

"To many object have been selected"

 

any advice on how to change or adjust it to where there is no limit?

Message 14 of 15
ckayZ3HMG
in reply to: paul_li

This didn't work the way I was hoping.  I had a block that I wanted to do an xclip to determine the exterior boundary and another closed pline boundary to hide an internal portion of the block.  The lisp ran fine but it did not result in the internal close boundary hiding that portion of the block.

Message 15 of 15
hak_vz
in reply to: paul_li

@ckayZ3HMG 

 

Check this post and attached code.

Miljenko Hatlak

EESignature

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost