10
$\begingroup$

Quantity and QuantityArray are great tools for working with types arrays (in terms of physical units), perform conversions and etc.

I have discovered recently, if there is no internet access (horrible!)

Quantity[1, "Millimeter"]

it returns

Quantity::conopen: Using Quantity requires internet connectivity. Please check your network connection. You may need to configure your firewall program or set a proxy in the Internet Connectivity tab of the Preferences dialog.

Is there any way of working with them offline. Wolfram Language should be some built-in knowledge about SI or Gaussian units. Should I reinvent the wheel and make my own units system to overcome this issue?

I believe it might also slow down the kernel, if there are many of them. Does Wolfram Kernel always go to the internet to convert every single one?

$\endgroup$
0

2 Answers 2

12
$\begingroup$

I have found by accident, that WL only requires internet if the form of the units is not conventional. In my example I should have used a plural form:

Quantity[1, "Millimeters"]

This works without the cache and the internet.

$\endgroup$
6
$\begingroup$

If you have Internet access prior to you work, you may try to force MMA to cache the function Quantity:

  • First turn on the Internet
  • Then evaluate e.g.: Quantity[1,"Meter"]
  • Then turn off the Internet
  • Now you can use Quantity without Internet access

This will work even if you terminate your language session with Quit[] and start a new session. (Note, this is valid for MMA version 14.1)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.