Jump to content

Marionette PIO for layer numbering

Recommended Posts

This Marionette Object Shows its layer name (last word) and the layer stacking order as a label. I often create documentation inside Vectorworks and do not want to use other applications for that. All we need is Vectorworks!


Contains some custom nodes:

1. "GetAllLayer" A List of Design Layers and a List of Sheet Layers

2. "Backward" A node to send an object in background (did not fount a native node for that ..?)

3. "GetLastWord" split the last word from a string

4. "GetObject" Wrapper to grab a Text Object with a Text Style and to transport this Textstil by copy/paste the script


Nothing spectacular but could be handy and really helps saving time compared to manually texting or stamping a counter on every layer. Also with the "GetLastWord" node, the layer can contain the chapter in his name.




Bildschirmfoto 2017-01-24 um 22.42.29.png

Share this post

Link to post

Hi DomC

Thank you for the file!

I am currently trying to extract the first character from a string to be used to make a text object. I thought that I could alter your "GetLastWord" to do this.

Would you be able to help me out on this?


Share this post

Link to post

In python, strings are treated as list objects.


# So take for the example the string below

some_string = "four"

# in python strings can be thought of as lists
# some_string = ['f','o','u','r']

# so to get the first character just use list slicing, calling the index of the character you are after in the string:
some_string[0] # will be equal to 'f'
# second string:
some_string[1] # will be equal to 'o'
# and so on..

# and to get the last character, use negative indices
some_string[-1] # last character = 'r'



Edited by twk

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.