algorithmic modeling for Rhino
hello, I would appreciate any insight into formatting list of data.
i have a list of <list of 1 item>:shown in top box. i'm trying to create a text tag in the model space to read "Fx" where x is my item in the list.
my formatting function is :
Format("F {0}", x)
but this gives the String "F{x}" not "Fx" as you can see on the bottom box.
it seems like it's due to x being a list - is there a way i can output the value only?
Format("F {{0}}", x) didn't work.
kat
Tags:
Hi kat,
x appears to be "{0}". Is x of type data-path? Anyway, I think you're confused since both the data of x and the formatting mask use curly brackets and it's not obvious which of those actually end up in the "F {0}" result.
If you want to remove the curly brackets, you can perform a string find/replace step, where you replace "{" with an empty string ("").
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by