Jump to content
Developer Wiki and Function Reference Links Read more... ×
Martin Crawford

Auto-Number Symbol ID

Recommended Posts

I am working on my first Marionette network to renumber an record attached to a symbol.


The network works somewhat correctly. I have two issues that I can't seem to figure out.


The first is I have to subtract 2 from the start sequence to get the starting correct. My guess is I don't really need to subtract 2 to get things working and this is a band-aid. Second, is the number are not always connective. On my computer when I run the attached script , the last few symbols have the incorrect numbers. Depending on the file I run this on, I get different results.


When I was creating the network, instead of running from a menu, I set the selection to s='Prime - 2.4N' (the name of the symbol) and everything worked correctly. I thought I could simply change the selection to sel = true, convert to a menu and all would be good.


One thought I had was adding a node to filter any items I selected that are not symbols, however I was unable to figure out how to do that. Is there a way to select, then filter only symbols, or better only symbols that have a record attached with ID as a field? (I'm not sure this is really required, as I'm not sure the root issue with the network). 


Not every node is used in this script, however it will grow to accomodate different numbering methods. Left-Right, Top-Bottom, Right-Left, Top-Bottom, etc.  That is why I have the mul nodes on the XY values..




Share this post

Link to post

@Martin CrawfordHi, the minus 1 was what I also did before the sequence. Not sure how its working for you but when i run the original file no numbers change in the symbols. If i change to false i get all to change. ?????


Share this post

Link to post

The network is meant to run as a menu command, so I could select a section of the panels and auto-number.


Sorry, I forgot that detail.


What I would like is to not limit the selection to just the one symbol.



Share this post

Link to post

Hello Martin,


To answer your question about filtering - you can filter by object type. You can find a list of Vectorworks object types here: http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#objects


I have added a section that filters by object type to your network. 




I find this little network to be very useful - changing the value of the integer changes the object type you are looking for, but you can also change the Get Type node to another Get Object Info node that gives you a number value and the Integer node to the appropriate value you want to match it to.



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.