Pat Stanford Posted June 8, 2009 Share Posted June 8, 2009 By request, here is a script that will set the class of every viewport in a drawing to the None class. Procedure MatchCropClassToViewport; {This script will set the class of every viewport in a drawing to the None Class} {? 2009, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed unde the GNU Lesser General Public License} Procedure SetCropClass(VPHand:Handle); Begin SetClass(VPHand,'None'); End; Begin ForEachObject(SetCropClass,(((PON='NNA_DesignLayerViewport')|(T=VIEWPORT)))); End; Run (MatchCropClassToViewport); Quote Link to comment
Stan Rostas Posted July 24, 2009 Share Posted July 24, 2009 Pat I assume if we change 'None' to whatever class we want by its name it will also work. Does the class have to be in the file first or will this script create the class if not available? Thanks for sharing. Quote Link to comment
Pat Stanford Posted July 24, 2009 Author Share Posted July 24, 2009 Yes, you can change the class from None to whatever you want. Make sure you keep the quotes around it. If the class does not exist in the file it will be created. If it does exist, it will be used. Quote Link to comment
FELIPE Posted November 30, 2016 Share Posted November 30, 2016 Thanks, Pat. I much appreciate this. I started learning VectorScript now. Going to try to tackle some class organization scripts on my own now using this one as a guide. Best regards, Felipe. 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.