Revit Bulk Unit Conversion Addin

Check out the updated version of the Revit Bulk Unit Conversion Addin and the story behind the update process on my new site digitalBBQ, and also on GitHub:

Revit Unit Conversion Addin for Revit 2017-2021 (source code only)

Revit Unit Conversion Addin for Revit 2022-2024

Revit Unit Conversion Addin for Revit 2022-2024 Installer

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Revit Bulk Unit Conversion Addin

One of the most downloaded files here at Revit.AU is the metric conversion journal script. Despite the obvious downsides of journal scripting, it works about 98.27% of the time.

Based on feedback, the problems with the current journal conversion script are mostly due to user error, but occasionally even when the user followed the steps correctly, a problem would crop up that would stop the process in it’s tracks.

Because of this, one of my goals when learning how to use the Revit API has been to replace this journal script with a fully fledged addin. In my opinion, the biggest benefits seen by developing an addin to perform unit conversions are:

  • User-friendly interface
  • Ability to convert to both metric and imperial in the same tool
  • Automatically closes most popup dialogues
  • Handles sub-folders of files without issue
  • Much, much faster

Benchmarking

If I’m honest, I regret my choice of benchmarking method, a much smaller dataset would have done the job.

I rounded up 500 families totaling 169mb and ranging in size from 248kb to 1.5mb comprising of both 2D annotation and detail items as well as 3D components from architecture and MEP disciplines. I ran the same set of families through both the journal file conversion method and the addin conversion method, recording the total elapsed time for each.

I also used two different hardware configurations were in the benchmark tests; an i5 8400H with 32gb RAM and a 512gb NVME SSD and a i7 7820HK with 64gb RAM and a 1tb NVME SSD. The tests were run on Revit 2018.3 on both machines.

I hit the go button and decided to get some breakfast. This is going to take a while.

2 hours and 3 minutes later on the i5 8400H, the journal script failed on family 366. Repeating the same test on the i7 7820HK reached the failure point in around 1 hour and 40 minutes.

The addin, on the other hand, churned through all 500 families without error in 14 minutes on the i5 and 12 minutes on the i7.

Call it commitment or call it stupidity, but I also decided to time how long it would take to change the content in a single family manually to really showcase the power of automation, even if it’s on a tiny scale.

Manually updating a single family to change everything that the addin changes took 7 minutes and 18 seconds.

Of course, you normally wouldn’t change everything that the addin does, but we all love an apples to apples comparison. If you’re feeling like you need some extra excitement in your life, based on 7 minutes and 18 seconds to change a single family, manually updating 500 families will keep you busy for almost 61 hours!

Reliability

So far, I have processed close to 5000 different families from a range of different sources across all versions of Revit from 2017 to 2020 without a single error.

And let’s face it, although 365 of 500 families were processed with the journal, I couldn’t complete my automation without an error.

Couple the reliability of the addin with its ease of use and as an end user, you should have a vastly improved experience compared to the journal script.

Download

So if converting files between metric and imperial is something that you do, you can download the addin for free here:

Think this tool is worth something? Consider donating to support the operation of the site and the development of further tools in the future.

15 thoughts on “Revit Bulk Unit Conversion Addin

  1. avatar Cosmic Rocket says:

    Hi guys, I am having trouble downloading any of your scripts (specifically the metric conversion ones). The zip file that I download is always 1KB and i get an error message when I try to unzip it. Any ideas what im doing wrong?

  2. avatar Ryan Lenihan says:

    Hi, I apologise for not picking up on this sooner. I have just fixed all downloads that are available on the site, can you please check that they work now. I have tested each individually on my machine, it appears the problem was server-side.

  3. avatar Ryan Lenihan says:

    Hi, I apologise for not picking up on this sooner. I have just fixed all downloads that are available on the site, can you please check that they work now. I have tested each individually on my machine, it appears the problem was server-side.

  4. avatar seychellian says:

    Hi Ryan, thanks for this, I can now download it.

    I have tested it and it works pretty well. Although I am having 2 issues.

    1. (which is a bit of a deal breaker) is that it seems to me that you cant convert files “in place” meaning that if you have a directory of files sitting in their folders and sub-folders you can convert and keep them in the current locations. Instead you need to specifiy a folder where the converted files are to be saved (thereby you lose their filing structure). This is a deal breaker for people trying to convert a library.

    2. I noticed that when i try to convert files on my network dirve I get an error “rfa is not accessible or read only”. This one can be worked around but is just inconvenient.

    I know this is freeware so please dont take this is complainig or criticism. It’s just my feedback as an end user.

  5. avatar Ryan Lenihan says:

    Hey no problems at all, i appreciate the feedback. For comment #1 I can have a look at that no problems at all, although I won’t have an ETA on my availability to look at this just yet. In the meantime if you want a solution in the short term and your folder structure matches that of the family categories, I know it’s an extra step but you could load your content into a project and then use the case apps family exporter to export the families to their category folder.

    For comment #2, is this a write permission issue on your server? If not, are you trying to load the files from a UNC path such as \\my_server\library\ or is it a mapped network drive? I can test these scenarios and see what is going on there.

  6. avatar Tim says:

    Hi Ryan, Great addin any chance for an update to R21 ?

    Thanks

  7. avatar Ryan Lenihan says:

    Hey Tim, sure thing! Sorry for the delayed reply, have been a bit busy of late. I’ll get it updates over the weekend.

  8. avatar Ryan Lenihan says:

    Hey Tim, the addin has been updated for 2021, let me know if you have any troubles. You can get the file from the same download link.

  9. avatar Tim says:

    Ryan, great job, was curious why the bulk feature would fail, i tried couple of times ? thanks again

  10. avatar Ryan Lenihan says:

    Hi Tim, does the log file in the output directory show what family that it’s failing on? I’ve only tests a small batch of 45 families of mixed categories (mep, arch, tag, detail item), but I had no issue in 2021 when testing. Make sure your source and destination files are not the same, and that you are not trying to save the files to a location that they already exist as the batch process will not process the files based on those scenarios. I guess worth asking as well, is your Revit in English, or is in in another language? If the log is showing which file it’s stopping on, would you mind sharing the family with me? You could either link it here in the comments or send it through to me via the contact form (also as a link).

  11. avatar Tim says:

    Hey Ryan,
    Installed 2021 vesion and ran the batch tool again to no avail, to confirm, Revit is in English, the paths are specified to be different from the source, but still fails, individual conversion works, but batch wont work.
    The log file confirms succseful converion, but when I open any family its still maintains original units. let me ask you this: does the family needs to be the same revit version ? maybe it fails because it upgrades the family to revit version first ?

  12. avatar Ryan Lenihan says:

    Hey Tim, no you don’t have to be using the same version, the batch converter works as a file upgrader as well.

    Can I confirm that you were converting imperial -> metric? I believe I’ve found the bug, can you please download and try again. Same download link again. When you load the tool, it should be v1.210208 at the bottom of the window.

  13. avatar Tim says:

    Ok so i tried the batch tool, with upgraded families still fails to convert, the log file still confirms successful conversion for some reason.

  14. avatar Tim says:

    Ryan, it worked now, great job thanks again!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.