Hello DOJO
Is there a way to convert a string value, that represent an integer value, to an integer ?
I am trying to draw a shape that dynamically displays the value of a storage, with a min/max limit, but the storage format value is like this : "48375429 Frames"
Protocol is coded like this
<Type>read</Type>
<Interprete>
<RawType>numeric text</RawType>
<LengthType>next param</LengthType>
<Type>double</Type>
</Interprete>
Hi,
Do you mean that the raw value from the data source is text-based: "48375429 Frames"
And you would like to have this as a number-based parameter in your protocol so you could link it to a shape?
In that case the protocol will need to take care of the conversion.
This cannot be done right away from the Parameter definition. You will need to work in steps:
- Create a (hidden) textual parameter (Interprete other - string)
- Create a numeric parameter (that you will use to link to the shape)
- Create logic (QAction) that will trigger on change of the textual param and:
- trim the text,
- set the remaining numeric value in the numeric parameter.
Hi Joel, what do you mean that it’s complex to manage future update?
Change done by some other party to the protocol?
If this is a protocol owned by skyline so you could request this conversion feature for the param you need. (create a task)
Thank Mieke
I will dig this way, but each time I modify a protocol, it’s complicated to manage the future update