Skip to main content

Getting BIM data into Unity (Part 3 - Exporting a Schedule from ArchiCAD)

This is part 3 of a series of posts about getting BIM data into Unity.

In the first two posts, we introduced the basic of getting an ArchiCAD and Revit model into Unity. We hinted on the option of actually parsing more data from Schedules. This is what we’ll discuss in the next few articles. However, beware that this requires some scripting afterwards. Not too complex, but required anyway.

We start with ArchiCAD (but Revit will be discussed in a follow-up article, promised).

Preparing an ArchiCAD Schedule for use with Unity

Basic Objective: We will collect information from our BIM model into a table (schedule) for export. If we add the ID of the element in the first column, we can use that information to map the data from the table to the entity.

In ArchiCAD, there are three types of ID to identify individual objects in a project: the ID, the guid and the IFC guid.

There are two IDs that are set automatically and over which you don’t get any control. They are guaranteed to be unique and stable and are of primary importance in any collaborative BIM-based workflows, as they will be used to attach comments and the trace reports and exports back to the model.

There is an internal Unique ArchiCAD ID, which gets exported as the “batID” in IFC files. This is the real ID of the element. For compatibility with IFC, ArchiCAD also generates an IFC ID which fulfils the same function, but which has a different format when compared to the internal ArchiCAD ID. They both are long strings of unreadable text and are not meant to be used by the end user directly. They are all statistically unique, hence the term “globally unique ID”. Normally there would be no two items anywhere in the world that would receive the same identifier. And you can take this literally: we talk about IDs for anything: a object, a software application, a fridge, an item you would buy in a store etc… if they would ever get such an ID.

But there is also a user-editable ID string which you can set for any object. It can be anything and as such is up to the user to be defined. You’d better think of it as the name of the object. It can be something meaningful (e.g. D.02.05 for a door on the second floor with number 5) but there is no constraint.

This last one is used as the element name in the C4D export, but beware that there is no guarantee that they will actually be unique.

Ensure all elements have their own (unique) ID

It is in your best interest to ensure that no two elements get the same ID. There is a nice, slightly hidden tool in ArchiCAD, called the ID Manager, which you can use to automatically assign IDs to elements, based on certain patterns.

Document > Schedules and Lists > Element ID Manager…

Ensure that All Types are included, set the ID to “Unique ID for Each Element” and only add Element ID to the criteria.



The ID format can be very simple. You can define up to 4 components, based on the Criteria you selected. We’ll only use the Counter ID here (but set it to 001 so the first elements gets ID 001 instead of 000.



You can also manually edit them. This is easiest to do in a Schedule, which acts (almost) as an spreadsheet. Just make any kind of Schedule and add the ID as a field. This is en editable value and by making a nice list (e.g. by floor and by type or room relation), you can start typing them directly into the schedule.

Select any of the entities and check its properties. You'll see the ID in the Tags and Categories pane.



Create the Schedule in ArchiCAD

At lease, create a list of Walls, Floors, Doors, and Windows. You could make a full list of “All 3D Element types”, if you want.



Add some identifying field to the schedule. At least, ensure the ID is included. I’ve added Type, Home Story and the External IFC ID, as it will come in handy later on. Add some other fields too, such as Net Volume and “Building Material / …”. Those displayed in Blue are directly editable in the Interactive Schedule and you can highlight any element in plan view when you select it in the schedule.



With ArchiCAD 19, the list is slightly different. Here you have the “Full Element ID” instead of ID and “ArchiCAD IFC ID”, which you should probably include. The External IFC ID stays empty and should only be used with imported IFC entities. The Unique ID is the actual ArchiCAD guid.

Type and Library Part Name are good to have.



Export the schedule as a Tabbed text file or an Excel Workbook. It’s probably best to export to Excel and clean up the data. E.g. our locale uses “,” to indicate decimal fractions, but like most development environments, you’d best replace “,” with “.” which can easily be done with a Replace… operation in Excel.



Beware that the first line of the export contains the schedule title, with the second line the column or field names.

Conclusion

So where are we now? Not that far yet. We have de-coupled our model information from the model geometry. The actual geometry can be transferred to Unity like before (e.g. using the CINEMA 4D Exchange workflow), but since the ArchiCAD Element ID (the short name) is recovered in the process, we can relate all exported entities back to their source and with the information captured in a schedule.


That’s all for now. Misleadingly simple, I think. But there is more to come in the next installment of this series.

Comments

Popular posts from this blog

Improve usage of BIM during early design phases

When I was collecting ideas for a book chapter on BIM (that seemed to never have emerged after that), I collected 10 ideas, which I believe still reflect good recommendations to improve the usage of BIM during the early design phases. These ideas are related to BIM software, but you can apply them in any flavor, as long as you can model with Building Elements, Spaces and have control over representation. Introduction This article gives an overview of several recommendations and tips, to better apply BIM applications and BIM methodologies, in the context of the early design phases. Many of these tips are applicable in any BIM application and they are based on experience gathered from teaching, researching and using BIM software. Sometimes they could help software developers to improve the workflow of their particular BIM implementation. Tip 1 : Gradually increase the amount of information In the early design phases, the architect makes assumptions and lays out the main design in...

Getting BIM data into Unity (Part 9 - using IfcConvert)

This is part 9 of a series of posts about getting BIM data into Unity. In this post, we’ll discuss the IfcConvert utility from the IfcOpenShell Open Source IFC Library to preprocess an IFC model for integration with Unity. This is (finally?) again a coding post, with some scripts which are shared to build upon. Conversion of IFC into Unity-friendly formats The strategy with this approach is that you preprocess the IFC-file into more manageable formats for Unity integration. Most Web-platforms do some sort of pre-processing anyway, so what you see in your browsers is almost never an IFC-file, but an optimised Mesh-based geometric representation. However, it wouldn’t be BIM-related if we’d limit ourselves to the geometry, so we will parse the model information as well, albeit using another, pre-processed file. IFC to Wavefront OBJ I used a test IFC-model and used the IfcConvert-utility converted it into OBJ en XML formats. The default way to use it is very simple: ...

Getting BIM data into Unity (Part 8 - Strategies to tackle IFC)

This is part 8 of a series of posts about getting BIM data into Unity. In this post, we’ll discuss IFC as a transfer format towards Unity. As with the previous post, this is not a coding post, although hints and examples are provided. Open BIM and IFC Everybody who ever met me or heard me present on a conference or BIM-lecture will not be surprised to hear that I’m a strong believer in the Industry Foundation Classes (IFC), an open standard, with already two versions published as an ISO standard, being IFC2x2 and IFC4 (but surprisingly not IFC2x3 which is widely used). In the ideal world, this would be the format to use to transfer BIM data into another environment, such as Unity. So what are our options? Looking in the Unity Asset Store Assimp is a library which supports multiple formats, including IFC. https://assetstore.unity.com/packages/tools/modeling/trilib-unity-model-loader-package-91777   I did a few attempts, but alas without any success. It is po...