Convert IFC EXPRESS schema entities/classes to VB.NET classes
Asked Answered
L

3

1

I'm working on an project where I want to convert an EXPRESS file's classes into classes. It is really hard to process all the attributes of the stp file one by one, so I was wondering if there are alternative ways or tools which could convert the classes.

EDIT : I have discovered which does exactly what I want, but in . I have also seen IFC Engine DLL but have not found any code available.

Lenhart answered 13/5, 2016 at 8:9 Comment(0)
G
2

Creating classes for full EXPRESS schema is relatively complex task. If your language/platform of choice is vb.net I'd recommend to have a look on xBIM. It is open source toolkit which provides all you need to open IFC model and extract/create any data you need. xBIM is mostly written in C# so you can just reference it as a NuGet package. The latest development code also supports IFC4.

Grenville answered 17/5, 2016 at 12:9 Comment(0)
S
1

Both Jotne EPM www.epmtech.jotne.com and IFC Engine DLL www.ifcengine.com claim they support Visual Basic.

Solarize answered 13/5, 2016 at 13:19 Comment(1)
Thanks for your answer. I have seen both tools but I have not found any code to convert EXPRESS classes to VB classes. Do you know if this code I am looking for exists?Lenhart
A
1

You can try out oipExpress. oipExpress is a early binding generator written in C++. Just implement our own generator that generates VB.Net classes. Currently, it just generates C++ classes.

A basic generator for VB.Net classes could look like this (the generated binding can be found also here):

class GeneratorVBNet : public Generator {
public:
    GeneratorVBNet() {
    }
    virtual ~GeneratorVBNet() {
    }

    void generate(std::ostream &out, OpenInfraPlatform::ExpressBinding::Schema &schema) {
        for (int i = 0; i < schema.getEntityCount(); i++) {
            auto &entity = schema.getEntityByIndex(i);

            std::stringstream ss;
            ss << earlyBindingDestination << "\\" << entity.getName() << ".vb";

            std::ofstream ofs(ss.str(), std::ofstream::out);

            ofs << "Class " << entity.getName() << std::endl;

            ofs << "End Class" << std::endl;
        }
    }

private:
    std::string earlyBindingDestination = "E:\\dev\\EarlyBindingVBNet_IFC4x1_Add1";
};

The generated early binding will look like this: Generated early binding

The internal meta model of oipExpress looks like this: oipExpress Meta Model

Adal answered 1/1, 2017 at 16:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.