return entire Array
How can I get this to return an entire array without the (..)?
arr = for i = 1 to 30 collect i
arr
dont want -
#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...)
I want -
#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
Comments
StringArrayWithNoSpaceBetweenTwoItems
With this fn you can skip substring method
I'm using this to put array values to TextBox,
but without "#(" and ")".
a = for i in 1 to 30 collect i
fn stringArrNoSpace arr =
(
local res = "#("
for i = 1 to arr.count do
(
res += arr[i] as string ; if i < arr.count do res += ","
) ; res += ")"
)
stringArrNoSpace a
bga
SOLUTION!
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
more than expected
This is what I have so far.
Doesn't work if there is only 1 item in the array.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
I need it to be put into a
I need it to be put into a variable though. Not just printed....??
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Use the PrintAllElements
Use the
PrintAllElements
Tools and Scripts for Autodesk 3dsMax