Jump to content
Developer Wiki and Function Reference Links ×

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

 

Thanks

Autonumber_ID.vwx

Link to comment
  • Vectorworks, Inc Employee

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. 

 

5a53829ca5b2b_ScreenShot2018-01-08at9_34_00AM.thumb.png.ba36731dd077e8a9ab77834aea62c99a.png

 

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.

 

Autonumber_ID_sb.vwx

Link to comment

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.

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

×
×
  • Create New...