Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [V8i C] C API for getting values of configuration variables without using VBA?

$
0
0

Hi,

there are more different topics mentioned in your post. I recommend to split them into separate post for easier further discussion.

[quote user="SassafrasSoftware"]I need to be able to get the value of configuration variables.[/quote]

I have to admit I am not quite sure how to asnwer your main question: Jon provided some details about VBA and C and for me it sounds a bit strange to be afraid about VBA age and at the same time to request C that is probably twice older.

What do you mean by "configuration variables"? In the context of the used forum I suppose you mean MicroStation configuration variables, but in such case I don't know why registry and WMI are mentioned. Depending on what you need to work with the best tool will differ.

It's weird to discuss so different langauges as C and VBA just in terms of one functionality. Usually there are more required features to be implemented, so it's about to discuss what API is the best suited, or there are existing code already, so the choice was already done and new functionality is implemented using the same environment / tool / language.

If talking about MicroStation V8i, if there are no other conditions or requirements, you can use several different languages and related APIs:

  • Native C++: In my opinion the best option, but also the most complex. Probably every time C++ code is combined with calling MDL C API, because C++ MicroStationAPI does not provide full functionality. To write C code for MicroStation today sounds very strange to me.
  • VBA: Great for macros or as a tool to create proof of concept that will be later reimplemented using C++ or in some managed language. We can discuss if it's old, (un)supported etc, but at the end it's the best tool we have now for MicroStation macros and scripting.
  • Managed langauges (C#, VB.NET): There is no real NET API in MicroStation available now, managed API is Interop/COM equal to VBA plus some extra functionality (e.g. WinForms adapter).

If you will share more information about what do you want to achieve, it can be discussed what tool is the best for such task.

[quote user="SassafrasSoftware"] I would also like to avoid sub launching a distinct process[/quote]

Can you explain what do you mean by this question? Is it about you don't want to start another process what your application code?

[quote user="SassafrasSoftware"]as well as the possibility that VBA can be turned off[/quote]

Is it about if VBA can be disabled?

With regards,

  Jan


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>