Jump to content
Developer Wiki and Function Reference Links Read more... ×
Charlie Winter

Assign Class to Selected Symbol via Custom Script

Recommended Posts

Is it possible for a script to assign a specified class (written into the script) to single or multiple selected Lighting Device Objets?



Edited by Charlie Winter

Share this post

Link to post

A single object is easy:

SetClass( FSActLayer, ‘Class Name’ );


All select objects takes a bit more code structure. Look at ForEachObjectInList, which will iterate through objects. You can set the function to traverse all selected objects. 

Share this post

Link to post

So what Josh is referring to is a structure like this, which is one of the most time saving scripts you can have because it can be adapted to do so many things::


Procedure TimeSaver;


Procedure DoIt(h1 : HANDLE);


SetClass( h1, ‘Class Name’ );




ForEachObject(DoIt, (Sel = True));




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.