Jump to content
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

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...