Quantcast
Channel: PTC Community : All Content - Arbortext
Viewing all articles
Browse latest Browse all 1645

How to convert a string to float in Isodraw macros?

$
0
0

I'm sure this should be easy, but I don't know how to do it. I have a global string variable that's always a 2 digit number. I used it previously to build up a string filename. Now though, I use the same variables in a macro that has to do a calculation with it. Of course as a string it won't calculate.

 

I don't want to change my old macros that use the variable as a string, so is there a function to change it to a float temporarily for the calculation?

 

In my old ME10 macro language you could just do this:

 

calc_var = ((val date_var) + 1)

 

date_var is a string variable, but the "val" command read it as an number for the pruposes of the calculation whilst leaving the variable as a string.

 

Anyone know?


Viewing all articles
Browse latest Browse all 1645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>