Reading geometry from Slab elements in IModels


I'm trying to read geometry from slab elements like the one that can be found in test.i.dgn here, but I'm running into an issue. These slabs have geometry of type Group, but when I try to iterate over the elements in these groups and read each one like in the code snipped attached, the group->Members() call is always returning a null pointer. This code does work for other types of groups, but slabs seem to be a problem. 

I would appreciate any ideas or solutions anyone might have!

Thanks for your time,


processGroupGeom(Group^ group)
    for each (IGeometry^ member in group->Members())
        // Go through each child and process it

  • Hi Aidan, can you please post the original test.dgn file that you used to produce this? Also, what application are you using to produce i-models?

  • I've added the original dgn to my public folder linked in the original post. As for application, we used AECOsim to generate test.i.dgn.

  • Hi Aidan, 

    I just installed Aecosim Building Designer Update 3, opened the original .dgn file, then exported to i-model. When I read the resulting .i.dgn file, I am able to read the indexed mesh geometry from the element. But I cannot read it from the file that you sent me.

    Here is the i-model that I was able to generate. It is a different size than yours so I suspect that the generation process that you and I are using may be different, or maybe we are using a different version of ABD? 

    Which version are you using? And can you send me the settings that you are using to export to .i.dgn?

  • I've added screenshots of the version info and export settings that were used to create test.i.dgn to the "screenshots" subfolder of my public folder. I had a peek at the I-Model you generated, too, and found that I'm also able to read it. The element in your file has geometry type Indexed Mesh while in our file it has type Group, so you must be right that there is a difference in our processes.

  • Hi Aidan,

    Sorry I didn't see the notification about your reply. it looks like you are using the V8i version of ABD, which exports slab elements to .i.dgn as “xgraphics”. Unfortunately, the 1.0 version of the i-model SDK (which is the version that works with .i.dgn files) cannot read that graphics format. There are some options to get around that:

    1. Trying to export to i-model with the key-in “PUBLISHDGN CONVERTTOXGRAPHICS OFF;publishdgn dialog”. This will have to be run before the publishing step so that slab solids are not published in xgraphics format. I have had only limited success using this key-in with ABD V8i. Sometimes it works, sometimes it causes an error, sometimes the conversion doesn’t work. So this may not work, but it's something to try.
    2. Using AECOsim Building Designer CONNECT Edition. I have Update 3 and I was able to publish your slab element in a format that could be read by the i-model SDK so this may be the work for the rest of your elements as well.
    3. Using the 05.04 version of the i-model SDK to read graphics. This version of the SDK reads “.imodel” files. In the past, I have been able to read converted ABD files with xgraphics using this version of the i-model SDK. However, this will involve updating your source code to use the newer version of the SDK (non-trivial, but not overly complex), as well as adding extra steps to your reading/conversion process (i.e. converting from .dgn to .i.dgn, then to .imodel with ItgDgnDbImporter, then opening the file with the 05.04 version of the SDK and reading graphics).

    I can answer more questions and provide more detail if you want to email me directly at chris dot franklyn at bentley.