I’m trying to get a Window Mark to partially copy over to another instance parameter in the same window family. I’ve seen loads of scripts for doing direct like for like transfers but i was wondering if there was a node that would remove the last digit before copying over?
eg. Window Mark = W-S-00-001A
I want the Comment = W-S-00-001
I’m a Dynamo amateur for sure and have only modified other scripts in the past so not sure if possible.
Then use a String.Length node to find out how many characters are in the string.
Then subtract two from that value with a - node. Note I am suggesting two here instead of one to account for (1) the character you want to remove, and (2) the fact that the characters are stored as indices which start at 0 (like lists).
Then use a String.Substring node to get the characters from 0 to the result of the subtraction node.
Then set the parameter value by name as per usual.