Updated: iLogic Unit Converter

Some months back, I created the “iLogic Unit Converter” which used an old Autodesk website that is stored on the Internet Archive. It was a nice proof of concept, but was actually not very useful, due to speed issues and the limited number of conversions available.

With that in mind, I updated the code to display UnitConverters.net’s site, as it hosts a more diverse set of conversions, and is faster to run. The new iLogic rule does not require any additional downloads or setup, simply copy the code into an empty rule and you are up and running.

Below is an Animated GIF of the code running in Inventor.

I’ve included the original “legacy stuff” in the code below, just in case you want to reference it, it’s commented out, but may be useful to you . Here is the iLogic code:

'iLogic Rule by @ClintBrown3D
'Originally posted here: https://clintbrown.co.uk/updated:-ilogic-unit-converter

On Error GoTo ClintsErrorTrap

oURL = "https://www.unitconverters.net/common-converters.html"

' Create a WebBrowserDialog (Show the Unit Converter)
Dim oWebBrowserDialog As WebBrowserDialog
oWebBrowserDialog = ThisApplication.WebBrowserDialogs.Add(oURL)
oWebBrowserDialog.WindowState = kNormalWindow
oWebBrowserDialog.WindowState = kSmallWindow
oWebBrowserDialog.Navigate(oURL)

'--------------------------------------------------------------------------------------------------------------
'To set up the original "legacy" Converter, follow these instructions:

'Download the HTML File form here: https://drive.google.com/file/d/1EnpHkGJEPjEyKwRO__Z-Ab9VK3EJQc4y/view
'Save the HTML file to C:\Temp
'Set oURL to the address shown below
'oURL = "file:///C:/Temp/Unofficial Inventor.html" '********* This runs the slower legacy Autotdesk Calculator
'--------------------------------------------------------------------------------------------------------------

ClintsErrorTrap:

Notes:

This version of the code was briefly tested in Inventor 2020. Please note that I cannot offer any additional support, this blog post is offered as-is, and is aimed at the more advanced user.