A program to recognize and reward our most engaged community members
How can I control the numeric formatting and precision of the frequency values on the Notes description shown in Hyperview 2022.3 (classic interface), for example, from 3.390e+01Hz to 33.9Hz (see below)?
Thanks! Ricardo.
Hello @Ricardo_Assis
as mentioned in the support ticket, let me publically share below info:
In general when you format Templex expressions, you can use something like this
{entity.contour_val ,%0.10f }
But unfortunately the content of the Model Info note is not just a single number. There are development tickets already to have that improved for the future, but today you have to cut and convert the frequency number out of the full string, and then you can change the format.
These functions documented in our Online Help can be useful:
mid, strrchr, strchr, strlen, convert
As example from a Note:
This text in a Note
{window.simulationstep}
{a= mid(window.simulationstep,strrchr(window.simulationstep, chr(61))+4,strlen(window.simulationstep))}
a = {a}
{b=mid(a,0,strchr(a,"H"))}
b = {b}
{convert(b),%3.2e}
{convert(b),%3.2f}
will give this result:
Put into a single command it would look like:
{convert(mid(mid(window.simulationstep,strrchr(window.simulationstep, chr(61))+4,strlen(window.simulationstep)),0,strchr(mid(window.simulationstep,strrchr(window.simulationstep, chr(61))+4,strlen(window.simulationstep)),"H"))),%3.2e}
I hope this helps!
Regards, Sebastian Karp