Jump to content
Andreas D

String Format Node

Recommended Posts

Good Morning,


i have a short question regarding the String Format Node in Marionette... can't get it working.

Let's say i have a couple of Float Numbers (like 1.234, 2..345, 3.456...), already inside a Marionette Network. I want to format these with the "Format" Node in that way, that they always have either "+" or "-" and round them to let us say 2 digits. I know you can do this with other Nodes, but for now i would love to try it with the Format Node...

Maybe you can give me a short example of how to use it.


Thanks a lot


Share this post

Link to post
Posted (edited)

Hi Andreas,


For rounding the string use the placeholder {:+.2f}


This placeholder combines 2 fromating types.


See doc: https://www.w3schools.com/python/ref_string_format.asp



sFormat: "The Formated number is {:+.2f}"

sArg:        9.99



"The Formated number is +10.00"





Edited by PatW

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