maxscript : display commas in long numbers

maxscript : display commas in long numbers

blakestone
Collaborator Collaborator
798 Views
3 Replies
Message 1 of 4

maxscript : display commas in long numbers

blakestone
Collaborator
Collaborator

How can I add a comma in numbers so that it's displayed like this:

 

1000 = 1,000

10000 = 10,000

100000 = 100,000

1000000 = 1,000,000

etc.

 

I couldn't find anything in the help file which shows how to do this conversion, unless I need to write my own script for adding commas?

0 Likes
Accepted solutions (1)
799 Views
3 Replies
Replies (3)
Message 2 of 4

Steve_Curley
Mentor
Mentor
I don't think there's a built-in way to do it (could be wrong but I can't find one either). According to the main Python docs it could do it for you, but that would require Max2014+Ext1 or Max2015. Googling should find a myriad examples in many different languages, so finding a suitable one and converting it to MXS shouldn't be too difficult (easier than writing it yourself anyway).

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 4 of 4

blakestone
Collaborator
Collaborator

Perfect, thank you.

0 Likes