I am trying to get Visual Studio 2010 Express working with compiling the 'basic' sample. I did this by copying the sample files into a new VS DLL project and removed the existing files. I turned off precompiled headers (because of the errors the stdafx.h/cpp was giving me). I have added the MDL include directory and the library directory to their appropriate sections in the project config.
Now when compiling I am getting an error:
1>c:\program files\bentley\microstation v8i (selectseries 1)\microstation\mdl\include\bentleytype.h(72): fatal error C1189: #error : define the Int64 types
My questions are this: are you supposed to compile the DLL within the VS IDE? Is the creation of the .ma file to be done using bmake?
Trying both ways of compiling out, using the Microstation developer shell, I attempted at building the basic sample as-is using bmake. It incorrectly assumes VS2005 and is unable to find it. I pass bmake the dBUILD_WITH_VS2010 parameter and now it complains it is unable to find the VCVarsQueryRegistry2010.mki file.
This system seems way over complicated.
The DLLMDL method seems rather straight forward. I had a brief overview of the method from my reading of various posts, wikis and blogs here. It is a shame about the dialogs though. It will be interesting to see how Qt4 will behave in this environment.
Unknown said: There are examples delivered with the SDK (e.g. TextMod) that show how to create a command table for your .NET AddIn. The command table is an XML file. This has shortcomings compared to MDL commands, but they're better than the nothing available in VBA.
Sorry, I meant when using .NET do I have access to the same API/Library/routines as I would using MDL?
Jon, Russ
some comments.
Mark has mentioned a way to build the dll + ma (via dls), this is something I use now for nearly 10 years. Pro's:
1. I only have to deal with the ma when I like to create new icons/commands.
2. I can use edit+go mode when debugging my dll.
3. I can success whatever I like, in fact we currently move parts into .net 4.0 and use my Ustn-dll only as intermediate medium
and Con's:
1. there are some limitations in accessing resources (mainly datatype definitions used with mdlLinkage_ functions)
2. You have to define a interface for the commands (from ma into dll). I used one functions for nearly everything, which ends in a large switch inside the dll (~90 commands currently). But with seldom changes this is not really a problem (grows only)
3. when using MFC dialogs you are limited to the version of MFC Ustn was compiled with, due to restrictions by Microsoft.
I use MFC dialogs based on CBFramedModelessDlg for my modeless stuff and toolsettings. Works without problems, We even managed to have modeless .Net Dialogs from another external (.Net)dll. But this needs some message handling. I wish I had started with MDL dialogs, as you can access some controls you don't have anywhere else (i.e. colorpicker for indexed colors), but on the other hand, visual (and even logical) behaviour of MFC dialogs is really simple and fast. This design was available for V7 Ustn, and we didn't need to change the main concept, while the rest is evolution to keep up with Ustn as best as we can.
Anyhow, if you have no problems with the standard method for creating apps for Ustn, I would suggest just to use this to avoid getting problems no one else has :)
Michael
Russ said:When using .NET do I have access to the same API/Library/routines as I would using MDL?
All .NET languages can use the VBA COM server via the InterOp mechanism.
Some .NET languages can call MDL functions using PInvoke.
The MicroStationAPI, which is a C++ library, is the vehicle for future APIs from Bentley Systems. Of course, if you want to use the MicroStationAPI you must also use C++. I don't know if it's safe ever or always to use the MicroStationAPI with C++/CLR.
Regards, Jon Summers LA Solutions
Hello, i am new to this forum. I have the same problem as russ. Did anyone by now figured that out? I know the post is quiet old, but maybe you could help me...we work with Visual Studio 2010 ultimate and Windows 7 64 Bit. Isnt there anywhere a step by step tutorial which shows how to set up VS 2010 for the plugin development?
Kaitraktion said:Isnt there anywhere a step by step tutorial which shows how to set up VS 2010 for the plugin development?
It's not clear whether your question is related to this thread. Do you plan to develop:
We would like to develope a plugin for microstation, so i think this would be a .dll file and in VS 2010 we work with C++. We need to access pointclouds for our project. Due to the support this is only possible with the C++ API of Microstation.
Thus it should be #1.
The point cloud API is available to developers in MicroStation V8i SS3. It's in the Bentley::Ustn::PointCloud interface of the MicroStationAPI.
Here are some notes about Viz Studio and the MicroStationAPI .
Please start a new thread if you want to discuss the point cloud API.
Thanks for the info. We are working with Version V8i Selected Series 2 08.11.07.446. I suppose thats not SS3. Where could we download the SS3.
In our Bentley account i only found this version 08.11.07.443. For further questions ill open a new thread.
Regards, Kai
Hi Kaitraktion,
MicroStation V8i SELECTSeries 3 is not yet available. There is an early access program currently active (see communities.bentley.com/.../default.aspx).
Note that MicroStation V8i SELECTSeries 3 is build using Visual Studio 2005. So if you want to develop a plugin for MicroStation V8i SELECTSeries 3 you must use Visual Studio 2005, not Visual Studio 2010.
Thanks,
Mathieu
Unknown said:Note that MicroStation V8i SELECTSeries 3 is build using Visual Studio 2005. So if you want to develop a plugin for MicroStation V8i SELECTSeries 3 you must use Visual Studio 2005, not Visual Studio 2010.
Which Windows version would you recommend for MicroStation plugin development, XP (x86) or 7 (x64) ?