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

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