Jump to content
Pat Stanford

Set Viewports to None Class

Recommended Posts

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);




Run (MatchCropClassToViewport);

Share this post

Link to post


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.

Share this post

Link to post

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.

Share this post

Link to post

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,



Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.