Question

Sound-byte Question: How easy or difficult is it to parse a CAD/BIM file and return(export) just the names of those 'Layers, Sheets, or Worksets' contained within?

More Detailed Question:

I'm a practicing architect (not the software kind, but the building/construction kind) and we are entertaining the development of a custom product that monitors CAD/BIM files within a folder or set of folders and continually returns the names of the 'Layers', 'Sheets', and 'Worksets' contained within each file. In other words, if someone creates a layer called 'Electrical Wiring' within a (AutoCad, Revit, Microstation, or ArchiCad) file, for example, how difficult would it be to parse, fetch, and export that 'layer name' to another program, once the file was saved and updated? Just the 'layer name', 'sheet name', or 'workset name' and nothing else.

I realize I have no 'bounty' or 'reputation' to put forward for an answer, but I do have my own "Whuffies" in the area of 'architectural design' and could perhaps, as return for an answer, sketch you the cooliest little greenhouse/gazebo/deck/porch/spa/sunroom you've ever seen! ;) Afterall, I figure a return to local economies will save our overall economy, why can't these 'local economies' be digital and web-based economies as well? :)

Stop by my 'office' to take a look at our work: :) http://www.flickr.com/photos/studiowikitecture/sets/72157604538587139/

Thanks for your time. Cheers, Ryan

.............

Also wanted to include the following for clarification, if necessary.... (let me know if you need further clarification)

What are 'Layers'? Within CAD files and to some extend BIM files, 'Layers' are used organize common objects, for example... Exterior Wall Layer, Interior Wall Layer, Electrical Layer, Electrical Wiring Layer, Framing Layer, Slab Layer, Duct Layer..etc..etc.

What are 'Sheets'? Within both CAD/BIM files, 'Sheets' are used to compose, or turn off/on certain 'layers'. An 'electrical floor plan' for example, will have the 'electrical layer' and the 'wall layer' turned on, and superimposed on each other. Other layers, like the 'duct layer' would be turned off.

What are 'Worksets'? Worksets, are kind of like layers, but are more specific to BIM programs. They represent ways the user can 'break' up the BIM model into logical divisions of labor... for example. a workset for just the structural columns a workset for electrical panel and substations. a workset for just a 'wing' of a building etc...etc.

As a reference, if it matters, the following popular CAD/BIM programs are associated with the following languages and standards.

Revit: C#, C++, VB.NET, .NET, EXPRESS/STEP (file ext: .rvt)

AutoCad: C++, AutoLISP, Visual LISP, VBA, .NET and ObjectARX, STEP/EXPRESS (file ext: .dwg, .dxf)

Microstation: C/C++, VBA, .NET., STEP/EXPRESS (file ext: .dgn)

ArchiCAD: C/C++, GDL, BASIC, Visual Studio, Codewarrior, STEP/EXPRESS (file ext: .pla)

VectorWorks: C/C++, VB, STEP/EXPRESS

Was it helpful?

Solution

I think using a standard approach is the way to go here. STEP stands for "Standard for the Exchange of Product model data". It is also known as ISO 10303.

As you've pointed out, vendors implements the STEP standard, i.e. they allow users to export data in a STEP-File (ISO 10303-21) and/or STEP-XML files.

Once you've export the data in a STEP-File, you can theoretically parse it and extract the 'layer name', 'sheet name', or 'workset name' or whatever data from it. Tools are available to help you do that.

If you post the exported STEP-File you get from one of the tools you mentioned above, it would help to see what can be extracted.

OTHER TIPS

It will probably be difficult to find one solution that will work with each of these file types. However, at least AutoCAD and Microstation (I am have not used or developed against the others) support programming APIs that make it relatively easy to extract the layer names. Also, third party libraries, like those available from ODA make it pretty easy to open a CAD file (AutoCAD and Microstation in the ODA case) and read the layers. I have done this in C++ for projects in the past. ODA also has ActiveX and .NET compatible APIs so that it should be possible to develop applications in VB or C#/VB.Net. The ODA libraries are not available for free (that I am aware of).

Alternatively, you might be able to do this more generically using FME from Safe Software. This kind of solution is probably a bit friendlier to a non-programmer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top