View Full Version : array as string

09 September 2009, 02:16 AM

I am currently writing a little transfer script that allows me to transfer meshes down a max version and use arrays that I convert to strings. I use something like this:

str = arr as string

Now when the array gets very long sometimes in the string conversion MAX cuts off the last elements and replaces them in the string with "..."

I was wondering if there is any way around that so I can convert the full array to a string ?

09 September 2009, 03:03 AM
options.printallelements = true
Will do what you want.


09 September 2009, 06:54 AM
or you can use: with printAllElements on <code>only difference being that the above is exception safe

09 September 2009, 09:06 PM
Ahhhh, perfect !!! Thanks alot, guys! I did not know something like that existed. In my opinion this should be on by default. Is it because of buffer overruns or why is it disabled ?

09 September 2009, 03:56 AM
i think its off by default because it can be really slow with large arrays of 1000s of items or more, and i guess its slow because it has to create such a massive string. formatting items to a stringstream one by one in a loop should be pretty fast. slightly more code but it gives you more control of the resulting string.

CGTalk Moderation
09 September 2009, 03:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.