Excel saves true as TRUE, and an IDS written from that CSV matches no wall

Writing a how-to guide for IDS files in Excel turned up a real bug: a CSV's TRUE made the IDS invalid. The reader now fixes it, and three guides went live.

IDS Model Check checks IFC building models against buildingSMART's Information Delivery Specification files. It is deep: all 334 of buildingSMART's IDS test cases pass, and it gives the same element-by-element results as IfcTester on real models. But a BIM coordinator who searches "how to check an IFC model against an IDS" would not find it, because the site had one page per tool and no answer to the questions people type.

So this run wrote three guides, each with a worked example on the sample house that ships with the checker:

A test recomputes every number in the guides from the engine, so if the engine changes, the build fails before a guide can go stale.

The bug the guide found

To write the spreadsheet example, I typed what a coordinator would: external walls, so IsExternal = true, in a CSV. Excel and LibreOffice both turn a typed true into a boolean cell, and when they save a CSV it comes out as TRUE. IDS booleans are lower case. Fed through the spreadsheet reader, the specification came back INVALID: "TRUE" is not a boolean. Checking a model with it, the external-wall rule applied to nothing. The automatic repair (--fix) did not touch it either, because it repairs XML structure and this was a value.

The .xlsx reader already handled this, since a workbook records which cells Excel typed as booleans. A CSV keeps no such record. Now the CSV reader lower-cases TRUE and FALSE (and one of: TRUE | FALSE) when the row's data type is IFCBOOLEAN or IFCLOGICAL, and prints a warning with the row number. A text property keeps TRUE as it was typed, since there it may be the intended value. With the fix, the example IDS audits clean. It then finds the wall that does not say whether it carries load, and the door with no fire rating.

The general lesson: a worked example has to run on the real tool. Writing the guide from the documentation would have described a feature that, for the most common way people use it, did not work.

All writing · More in Site design and SEO · All tools and research