Pat Stanford 1,425 Posted June 6, 2009 This script will match the class of every crop object in a drawing to the class of its respective viewport. Procedure MatchCropClassToViewport; {This script will set the class of the crop object of every viewport in a drawing } {to the class of its viewport. It works for both sheet layer and design layer viewports.} {This is useful to help ease visibility issue regarding crop objects and make them easier} {to find and edit or delete.} {? 2009, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed unde the GNU Lesser General Public License} Procedure SetCropClass(VPHand:Handle); Var CropHand : Handle; Begin CropHand:=GetVPCropObject(VPHand); If CropHand <> nil then Begin SetClass(CropHand,GetClass(VPHand)); End; End; Begin ForEachObject(SetCropClass,(((PON='NNA_DesignLayerViewport')|(T=VIEWPORT)))); End; Run (MatchCropClassToViewport); Quote Share this post Link to post
Ray Libby 1 Posted June 7, 2009 Thanks Pat, great work! This is going to be very valuable. Quote Share this post Link to post
ccroft 0 Posted June 24, 2009 Quick question if you please (too tired to research) What is criteria PON? Quote Share this post Link to post
Pat Stanford 1,425 Posted June 24, 2009 I believe it is a Plug-in Object usage would be: PON='Door' to get all the door objects. Quote Share this post Link to post
gmm18 0 Posted June 26, 2009 Hey Pat, I have used this script on a file that was started by someone else, very helpful in the cleaning-up process. But now all of the crop objects have a solid line, and I have been trying to figure out how to modify your script to change the pen attributes to 'none' for all viewport crops, but, of course I am not getting it. Any recommendations? Thanks... Quote Share this post Link to post
Pat Stanford 1,425 Posted June 26, 2009 Right under the line: SetClass(CropHand,GetClass(VPHand)); Add a new line (Note that is a Zero): SetLS(CropHand,0); Quote Share this post Link to post