create new drawing elements in DGN in VBA

Hello,

I want to develop a new plugin that would extend Microstation. I want my plugin to create new elements in the DGN file that would show up graphically for people that dont have the plugin but that would be editable with more feature and information for the people with the plugin. Like Open Rail works on top of Microstation or C3D on top of ACAD.

I was going to start a prototype in VBA to show my bosses and coworkers before going deeper and migrating to .NET.

Do you think it's possible with VBA or should I move from the start to MDL or .NET?

Thanks,

-Alex

Parents
  • Hi Alex,

    Unknown said:
    Do you think it's possible with VBA or should I move from the start to MDL or .NET?

    You did not write for what MicroStation version do you plan to develop you application (V8i, CONNECT Edition...) and how complex (in terms of graphical structure and behaviour) your objects will be, so my comments are based on general assumptions:

    • MicroStation VBA is quite limited, e.g. now full acess to 3D elements is available. Also there is no API for work with advanced user data structures, which I guess is required to hold object internal state (and to form its intelligence). So VBA probably can be use das very basic prototyping tool, but nothing more.
    • I think also NET API is not good choice in your case.
      • In MicroStation V8i NET API is equal to VBA, because it's the same COM model with some NET functionality (WinForms adapter).
      • In MicroStation CONNECT Edition there is completely new NET API, so not enough experience and best practices are available now. There are plenty of new functionality, but also some functionality is missing (using C++ API terminology, NET API provides DgnPlatform featues, but nearly no MicroStationPlatform features, so to chose it can be risky.
    • Native code (C/C++) API provides the best access to MicroStation and DGN functionality both in V8i and CONNECT Edition. It's the best choice (but also the most complex one) to implemen the app functionality.

    In my opinion APIs should be combined: To use C/C++ API to implement complex functionality and WinForm (in V8i) or WPF (in CE) to implement GUI. C++/CLI can be used to create wrappers between these two worlds (native and managed).

    With regards,

     Jan

  • Jan,

    Your assumptions are correct we are using MS V8i. It's good to know the .NET API is still at early stages, coming from ACAD I was expecting it to be more developed.

    Thank you,
    -Alex.
  • Hi Alex,

    Unknown said:
    It's good to know the .NET API is still at early stages

    In fact there is not real NET API in MicroStation V8i, but Interop is used.

    Unknown said:
    coming from ACAD I was expecting it to be more developed.

    That is completely wrong assumption and comparison. In MicroStation always native C/C++ code was defined as primary API. It makes sense, because only native code can ensure 100% speed, not managed API requiring a lot of marshalling and time consuming memory allocation. The situation is much better in CONNECT Edition, but even in this version NET API is not designed as C++ API replacement.

    C++/CLI is good alternative if you prefer to be in managed world but need to use full MicroStation API, because you can use managed and native code in the same project and to create wrappers to be referenced by a pure managed code (C#, VB.NET...).

    With regards,

      Jan

Reply
  • Hi Alex,

    Unknown said:
    It's good to know the .NET API is still at early stages

    In fact there is not real NET API in MicroStation V8i, but Interop is used.

    Unknown said:
    coming from ACAD I was expecting it to be more developed.

    That is completely wrong assumption and comparison. In MicroStation always native C/C++ code was defined as primary API. It makes sense, because only native code can ensure 100% speed, not managed API requiring a lot of marshalling and time consuming memory allocation. The situation is much better in CONNECT Edition, but even in this version NET API is not designed as C++ API replacement.

    C++/CLI is good alternative if you prefer to be in managed world but need to use full MicroStation API, because you can use managed and native code in the same project and to create wrappers to be referenced by a pure managed code (C#, VB.NET...).

    With regards,

      Jan

Children
No Data