I am new to Microstation API. I am a C# developer. I need to retrive information from Microstation application using C# application. Is there any tutorial for Microstation API for C# developers?
If your using Microstation V8i, the following links helped me get started:
The target framework needs to be 3.5. 4.0 won't work and will lead to hair loss, trust me. 4.0 can actually be done, but it involves modifying the ustation.exe.config file, as shown here. I think I had another issue with the code from the first link and the second one helped, but I don't remember exactly what that was.
To help testing the add-in, I added a post build command line event to copy the dll to my Microstation folder under the build events tab of the project properties.
xcopy "$(TargetPath)" "C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\mdlapps" /Y
Then I set the start action to be "Start external program:" and set the path to the Microstation executable.
C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\ustation.exe
This allows me to debug normally with F5. It will compile the dll, copy it, and start Microstation. Still need to key in mdl load MyAddIn from the key-in dialog. I'm sure that could be automated also if I really wanted. Being able to add breakpoints is very very handy.
Goodbye vba and hello source control.
check this: http://communities.bentley.com/communities/other_communities/bdn_other_communities/b/bdn-blog/archive/2011/07/26/learn-microstation-addins-step-by-step-0.aspx
Step by step tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With