Dieter @ DWorks Posted September 24, 2007 Share Posted September 24, 2007 is there an easy way to convert units? This is what I want to do: I use CalcVolume(). This gives me the volume in the units that are set in the options. I now need to convert this to 'cm' units (or other) for further calculations. It can be done by searching which unit is chosen for volumes, but what if the use has chosen not a standard one? Isn't there a converting method? If not, please NNA, make one. For the main time: How can you do this easily? Quote Link to comment
Dieter @ DWorks Posted September 24, 2007 Author Share Posted September 24, 2007 I found the solution: I can convert all units to inch units with preferences i found in the appendix. You have a pref for units per inch, area units per square inch and volume units per cubic inch. So what you need to do when calculating in a script is divide the answer with the pref. Then you can do calculations that are all in inch (so they are correct). And when you are done and want to show them in the oip, just multiply by the pref. (plain, area or volume, that's the thing you'll need to know). I hope I helped others with this. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.