Revit UniqueId in Glue and Navisworks

Every Revit element has a property called UniqueId. As the name suggests, it’s an unique identifier of an element in Revit. At glance, it looks like GUID. But it actually has additional eight (8) characters at the end. It was added for API users in order to uniquely identify each element. Other properties, for example, Element ID, is not guarantied to be unique. DWF and IFC use GUID. But as stated above, they differ from UniqueId. UniqueId is accessible only by API. (Jeremy Tammik describes this topic in detail on his blog.)

Being able to identify each element by UniqueId is important for many API users in order to link external information to a specific element. For example, to realize a round trip between Revit model and an analysis program, you may use UniqueId to identify the existing elements.

How can I access Revit UniqueId in Glue?” is one of questions I get occasionally. It wasn’t possible originally. With the enhancement with Navisworks exporter, it is possible to include it and view in Glue properties dialog. (Make sure you install the latest version of 2015 exporter and above.) But it may not be so obvious as UniqueId is not included by default when importing/exporting to a Navisworks file.

Revit to Glue

To include UniqueId in Glue viewer, you will need to specify it in the Navisworks exporter options. From Revit, go to Export to Navisworks command (either from External Tools or big “R” >> Export >> NWC). In [Export scene as … ] dialog, click on [Navisworks settings…]. In the [Navisworks Options Editor – Revit] dialog, check mark [Convert element properties].

6a019b00bdedf0970b01b7c74c2419970b

This includes UniqueId as a part of exported NWC file. Once you upload this exported NWC file, you will see property category called “Element Properties”. Under this category, you will see UniqueuId.

6a019b00bdedf0970b01b8d0d581d8970c

Via Navisworks

Another route is from Navisworks. UniqueId will be included by setting [Covert element properties] turned on. From big “N” >> [Options] >> [File Readers] >> [Revit] >> check mark [Cover element properties].

6a019b00bdedf0970b01bb07efdbd7970d

With this setting, open or reload a Revit file. Once loaded, check the properties. You will see UniqueId under [Element Properties] tab:]. You can use GlueIt addin command to upload Revit files.

6a019b00bdedf0970b01bb07efdbde970d

Accessing through API

Now that we see UniqueId in the Glue’s element properties, I tested using Lab4 Glue API Web Intro JS sample to see if we can access it from the selected element. The result is – it is possible. A sample image is shown below.

6a019b00bdedf0970b01b7c74c248c970b

Note: while accessing properties of a selected element has many use cases of application, you may also question if we can search entire model using an UniqueID. Unfortunately, it is not possible at a moment. This will be another enhancement wish.

Mikako

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s