Dexie Posted June 29, 2016 Share Posted June 29, 2016 Is there a way to custom select and separate closed polygons from open polygons where all other attributes are the same. The select similar tool doesn't seem to have anything that will do the job, neither does the custom selection option, unless I am missing something. Quote Link to comment
michaelk Posted June 29, 2016 Share Posted June 29, 2016 (edited) I don't think the custom select command will do it. Not sure if it's possible to even make a one-line script to do this. This is a pretty easily scriptable problem. I'll attach an example in vectorscript that select only closed or only open polys, but it would be just as easy to do in python and I bet it would be easy to do in marionette. hth mk Edited June 29, 2016 by michaelk Quote Link to comment
Dexie Posted June 30, 2016 Author Share Posted June 30, 2016 Thanks for that, it does the job perfectly. Your help is much appreciated. Cheers! Quote Link to comment
Cambridge Posted March 27, 2017 Share Posted March 27, 2017 I was just looking for a solution to the same problem, and am wondering if anyone has the script that michaelk mentioned above? Thanks! Quote Link to comment
michaelk Posted March 28, 2017 Share Posted March 28, 2017 I couldn't find it on this computer. And I don't remember writing this script :-0 But it was probably something like this: Procedure SelectClosedPolys; {Badly scripted by Michael Klaers - michaelk@verysmallgroup.com} {March, 2017} {This script selects all closed polygons and polylines in a drawing} VAR PolyHand : Handle; PROCEDURE SelectIt(PolyHand:HANDLE); BEGIN IF IsPolyClosed(PolyHand) THEN SetSelect(PolyHand); END; {------------------------------Begin Main------------------------------} BEGIN DSelectAll; ForEachObject(SelectIt, (((T=POLY)|(T=POLYLINE)))); END; {------------------------------End Main------------------------------} RUN(SelectClosedPolys); And this: Procedure SelectOpenPolys; {Badly scripted by Michael Klaers - michaelk@verysmallgroup.com} {March, 2017} {This script selects all open polygons and polylines in a drawing} VAR PolyHand : Handle; PROCEDURE SelectIt(PolyHand:HANDLE); BEGIN IF NOT IsPolyClosed(PolyHand) THEN SetSelect(PolyHand); END; {------------------------------Begin Main------------------------------} BEGIN DSelectAll; ForEachObject(SelectIt, (((T=POLY)|(T=POLYLINE)))); END; {------------------------------End Main------------------------------} RUN(SelectOpenPolys); I'll also attach a file. mk Select Open or Closed Polys.vwx Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.