- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to animate an LED style 7 segment numerical display and I am almost there based on this excellent tutorial found here:
However I am struggling to get the text output correctly formatted. I want the output always to have three numerical places with leading zeros when required – i.e.
001
002
003
Etc.
I found a tip to use formattedprint in an old thread on CGTalk but I guess I am not applying this correctly. The expression I have in the Script Controller is as follows:
TextRamp.text = ($ET1.distance as integer)as string
formattedprint TextRamp.text format:"03d"
0
But this has no effect on the format of my variable Text.Ramp.text.
I would be very grateful if anyone can help me out with this as I know practically nothing about Max Script!
Thanks in advance… 😊
Solved! Go to Solution.