Jump to content
SgtPepper

Script to Set the Active Class

Recommended Posts

Does anyone know if it's possible to create a script set the active class. I'd like to have a small palette on screen that sets my most used classes as the active class. This would give a much quicker way of getting to the classes I need the most without constantly searching through the full class list. I'm aware you can do it with saved views (as I've shown on the attached screenshot) but if possible I'd prefer to have it in a seperate list. 

 

5a27c6f453be0_ClassPaletteScreenshot.thumb.png.2bff2b31d78027d730305c2c30510532.png

Edited by SgtPepper

Share this post


Link to post

Sure the script can be a single line:

 

NameClass('My Class Name');

 

Where you replace My Class Name with the appropriate name.

 

Two things. 1. If you make a typo in the class name, it will create a new class and set that class to active. 2. The Function Reference says class names have a maximum of 20 characters. I don't think that is still the case, but I am not certain.

Share this post


Link to post

That is so useful. It's allowed me to create several palettes that act as shortcuts to the most used classes for a couple of different tasks. Means people don't have to understand the class system to use it!

 

Thank you!

Share this post


Link to post
On 12/6/2017 at 9:51 AM, Pat Stanford said:

The Function Reference says class names have a maximum of 20 characters. I don't think that is still the case, but I am not certain.

 

Not still the case.  I have a class with 36 characters, including spaces and dashes.  

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.

×