hexagon logo

Writting of the '%' symbol with STR_SPRINTF command

Hello,
 
I am trying to write the results in the txt file with STR_SPRINTF command:
 
file text write file=(eval($_self.file_out)) newline=yes format=(eval(STR_SPRINTF("COG_height = %.2f ; %% %s", {$_self.GIRO_RIDE_Height, '[mm] COG height above road'})))
 
I have a problem with % symbol.
 
When I try to evaluate the function:
STR_SPRINTF("COG_height = %.2f ; %% %s", {$_self.GIRO_RIDE_Height, '[mm] COG height above road'})
in the function builder or in string variable then everything is working:
COG_height = 559.01 ; % [mm] COG height above road
 
When I use same expression in the macro, then I am getting an error message:
! ERROR: You have not supplied enough arguments for the given format writing to file "XYZ_Model_Report.txt" .
 
Does anybody has an idea what could be the reason for this behavior?
 
Thanks and best regards,
Ondrej
 
Parents Reply Children
No Data