Jump to content

Assign class name on symbols

Recommended Posts


I've been roaming around in here trying to figure out if it possible to write a script that can assign class name to a symbol.

I have a symbol library the I need to modify the class names.

The symbol contains only one class.


Or is it an easier way maybe?




Share this post

Link to post

Yes this can be scripted, but you will either need to learn how to work with Resource Lists or walk the symbol definitions manually. I think walking it manually for a 1 time use might be easier.


H1:=FSymDef returns a handle to the first symbol definition in the file. 

Check if that symbol definition has a class that needs to be replaced (whatever that means in your case).

If it does need to be replaced, then use SetClass or SetClassN to change the class if not do nothing.



Procedure Pseudocode:

Var H1:Handle;



  While H1<>Nil do


      If GetClass(H1)='Class to Replace' then SetClass(H1,'NewClassName');






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