Jump to content
Developer Wiki and Function Reference Links ×

Converting units


Recommended Posts

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?

Link to comment

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...