Good Afternoon. I'm brand new to the world of Microstation and MDL. (almost 2 whole months).
I am attempting to write a program in MDL to automate a routine which uses some of the terrasolid products(A third party MDL software). So far my research has lead me to believe I cannot use VBA to do this. I have corresponed with Bentley support and was told I needed the following:
*******************************************************************************************************************************
Download MDL Dev tools from WEB: ============================== from http://appsnet.bentley.com/downloads/default.aspx Pick Product: Microstation and then click "Search" button, You should be able to find "MicroStation V8 Programming Documentation/ Examples" and click Download to start. After you install the above examples/ Documentation, you will be able to access MDL reference Manual and developer guide from X:\Program Files\Bentley\Program\MicroStation\mdl\docs\*.chm The V8 development shell is located at Start -> Program -> Microstation -> MicroStation Development Shell Please try to compile the delivered example such as: X:\Program Files\Bentley\Program\MicroStation\mdl\examples\basic
***************************************************************************************************************************************
I am running Microstation V8 2004 edition. I would like to use Visual Studio 2008 to write my MDL program. However It's here that I run into the ROAD BLOCK!
I can compile and successully run a basic example provided by Bentley in the developer shell, however each time I open it I get the following error before the prompt:
Visual C++ product directory could not be found.
Set nttools to Visual C++ product directory.
Set LIB and INCLUDE appropriately.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Also, my mdl bin folder does not include the mstndevvars.bat in ..\mdl\bin\which is recommended to use for configuring an MDL development environment. It is in the jmdl folder though.
mstndevvars.bat
..\mdl\bin\
If someone would point me in the right direction I would greatly appreciate it.
Sincerly,
Rachel Marco
I have worked through the Basic example in the MDL Programmers Reference guide and have learned that an MDL application is comprised of 21 different files. (At least the 'Basic' example is).
MDL is a somewhat raw development environment compared to the facilities provided by something like Visual Studio 2008. IDEs like Visual Studio hide some of the complexity of C++ development. It too has a lot of intermediate files that are auto-generated, but in normal use you don't see those files.
Source files that you write to create an MDL application include:
MDL development is not for the faint-hearted. It's a little puzzling that you were advised that VBA is not the right tool. Did your advisor provide any concrete reason why VBA is not the right tool?
Regards, Jon Summers LA Solutions
Thank you Jon for the information. It has helped clear up alot of questions.
As to your question about VBA not being the right tool for what I am attempting to do......
We have a routine which interacts with Terrasolid products. Two of the three we use have public functions which I'm pretty sure I can access through VBA. (TerraScan and TerraModel). The third product TerraMatch does not have public functions. It is my belief that for that portion of the routine I will have to open the TerraMatch MDL via my MDL , have the user manually do that portion of the process and then return to my MDL and finish the routine. My goal is to reduce the time spent performming this particular task.
In this particular routine I will be:
opening TerraScan and reading in a set of points
Using the display window in TerraScan to set the points to a certain class
Open TerraMatch
Perform my tasks in TerraMatch
save the point file in TerraScan
Close TerraScan
Basically the steps above are what I want to accomplish in a loop type fashion, since I will have multiple point files to adjust.
Have a Great Day! Rachel
Rachel_985: The third product TerraMatch does not have public functions. It is my belief that for that portion of the routine I will have to open the TerraMatch MDL via my MDL, have the user manually do that portion of the process and then return to my MDL and finish the routine.
It's still not clear what you could achieve using MDL compared to VBA. The lack of public functions is not somehow overcome by using MDL. Private functions will remain private, whatever language you choose for your application. VBA is just as capable as MDL of starting another application: MDL LOAD TerraMatch should do the trick, whether encoded in a VBA routine or an MDL application.
Once an MDL application is loaded, you can send commands from another application just as you can keyin commands as a user.