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

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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.

  • Create New...