Ok So I have installed MicroStation CE Update 13
I have Visual Studio 2017 Pro with relevant add-ins.
I have installed the MicroStation CE Updated 13 SDK.
And then I get stuck....on getting up and running
The only included documentation in the latest SDK is 6 year out of date and incomplete and does not work.
The only u-tube video on the subject is out of date and does not work.
I cannot find anything on the learn server.
So how do I get started here?
Does any one have step by step instructions on how to get Visual Studio 2017 working with MicroStation and the SDK from the point of installation of the apps and the SDK?
Any help gratefully received.
With Hope
Stephen Holmes
Hi Stephen,
Stephen Holmes said:So how do I get started here?
Well, do you really expect you will receive answer when you do not provide information what you want to do and what to achieve?
It's like "I have a new kitchen. I am lost, I do not know what to do next." Hard to advice when it's not clear whether it's required to prepare English style breakfast or vegetarian one, soup or steak or even complete Italain style main dish (primi piatti, secondi piatti etc.).
In your case, what you want to do? Write native code application, managed code addin, external application accessing MicroStation from outside, to migrate older code to CONNECT Edition platform or something else?
Stephen Holmes said:And then I get stuck....on getting up and running
Are you able to compile all examples delivered with MicroStation SDK? Both native, managed and mixed mode ones? It's the only proof SDK is configured properly.
Stephen Holmes said:The only included documentation in the latest SDK is 6 year out of date and incomplete and does not work.
Not true at all.
Despite of managed API documentation is not perfect and often detail description is missing, it's has been enhanced with every SDK release and especially in Update 13 it was extended substantially, because several extra documents about EC API were added. And where managed doc is not enough, often native version can be used because the structure of APIs are similar.
So no documentation is 6 year old. Sometimes incomplete, but not out of date.
Stephen Holmes said:Does any one have step by step instructions on how to get Visual Studio 2017 working with MicroStation and the SDK from the point of installation of the apps and the SDK?
When it's not clear what your current knowledge is and what is your aim, I do not know any advice I can give you.
When MicroStation SDK shell is properly configured, native applications can be compiled using bmake. And for managed addins, you can use Visual Studio (without any extension) directly ... even though I do not recommend such approach for any professional development (but for start it's fine).
Stephen Holmes said:The only u-tube video on the subject is out of date and does not work.
Please be specific. Sorry, but I really dislike people complaining without providing any particular fact or detail. What video? What does not work?
I am aware BDN YouTube channel contains 3 videos only, which is not much, and the lack of training materials has been discussed many times, but when all links available at "main programming page" are used, it provides at least some amount knowledge that can be used. But the best source of information are SDK examples and this forum.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Stephen Holmes said: I have installed MicroStation CE Update 13 . I have Visual Studio 2017 Pro. I have installed the MicroStation CE Updated 13 SDK. And then I get stuck
I have installed MicroStation CE Update 13 . I have Visual Studio 2017 Pro. I have installed the MicroStation CE Updated 13 SDK. And then I get stuck
I concur with Jan's comments. State what you want to develop!
Each time Bentley Systems release a new SDK, I test it by building all the examples. There's a batch file provided in the \SDK\examples folder that starts those builds. It works when you have Viz Studio installed and then install the SDK. The SDK searches the Windows Registry to find information about Viz Studio.
\SDK\examples
Stephen Holmes said:I have Visual Studio 2017 Pro with relevant add-ins.
What are 'relevant add-ins'? It's best to start with plain Viz Studio. Add-Ins cloud the issue.
Jan Šlegr said:The only included documentation in the latest SDK is 6 year out of date
The biggest problem with the documentation is not that it's out of date (it isn't) but that it's spread over several .chm files. For C++ there's a single help file, but for .NET there are about five: your first challenge is to work out which one is relevant to your search.
.chm
Regards, Jon Summers LA Solutions
Hi Both,
Apologies for not giving more detail.
I have written windows form apps in C# and VB.net (none MicroStation), I have written extensively VBA apps in MicroStation.I want to move into writing apps for MicroStation in C# and/or C++ .I've been using MicroStation for 30 years.
So I want to get started with C# and/or C++ app writing in MicroStation
At this stage my aim is to write a simple MicroStation app in C# - just to draw one line from point A to Point B to make sure the developer environment is working OK,and to allow me to write in Visual Studio and run the app in MicroStation, debugging in Visual Studio.
So what I have done so far....
I have a brand new windows 10 computer with all the latest windows 10 updates...
I have installed Visual Studio 2017 Pro
I have installed MicroStation Update 13
I have installed MicroStation Update 13 SDK
I have launched the SDK with the icon on the desktop (running as administrator)
I have typed buildallexamples.bat
All examples appear to have built successfully (a couple flashed up red with a dependency missing warning)
I click N to not view the log files
I then typed DEVENV
I get error 'devenv' is not recognised and an internal or external command, operable program or batch file
Where did I go wrong so far?
My reference points for how to install and set up Vis Studio with the SDK have been:
https://www.youtube.com/watch?v=gjROBS4T1oo Swarnilla Sett's video from 2018
"C:\Program Files\Bentley\MicroStationCONNECTSDK\Documentation\Readme\index.html"
The quickinstall guide here only goes as far as downloading and running the installer of the SDK.
"C:\Program Files\Bentley\MicroStationCONNECTSDK\Documentation\Migration\Using MicroStation x64 Beta 1 MDL SDK\Using MicroStation x64 Beta 1 MDL SDK-v2.pdf"
This appears to be a document from the early Beta versions of the SDK from several years ago and section 6 starts writing bat files to launch the environment which appears to be incorrect and out of date.
Have I missed a document somewhere that tells me how to install and set up the environment to work with Viz Studio 2017?
What have I done wrong so far in trying to get the environment to launch correctly?
Thank you in advance for you help.
Regards
Stephen
Hello Stephen,
you could start your VIZ2017 with:
C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Professional\Common7\IDE\devenv.exe /useenv
inside the Bentley shell. (maybe your path is a litte differ) "/useenv" tells VIZ2017 to use the variables from the shell, i. e. include, lib, etc.
Mit freundlichen Grüßen / Best regards Volker Hüfner
| AB_DATE Engineering Software | ab-date.de |
Thank you Volker, That has got Viz launching now - one step further forward...
It appears that the environment variables are not being set up correctly as I noticed right at the start of the SDK launch there is an error.will need to go through the bat files and see what is wrong...incase it will cause problems later...
So now in Viz...So I then open one of the example solution files MyApp and build it and play it on the local windows debugger I then get...
Ok simple to fix here just need to change the .sln debugging properties and set the command line properly to the commercial default locations for MicroStation.exe - why are the example files not set to launch with the default commercial install location of MicroStation instead of a beta test environment?
Ahh Well...
Next step check through all the sdk bat files to see what is failing - I think one of the shortened paths for one of the environment variables is not being recognised in Windows 10
Still making progress now, thanks for you help Volker.
Maybe this will this help you.
https://communities.bentley.com/communities/user_communities/ohio_dot__consultants/w/ohiodot---wikis/42366/creating-microstation-addins-in-c-with-visual-studio---a-step-by-step-guide
Regards,
Brian L.
Stephen Holmes said:I think one of the shortened paths for one of the environment variables is
You are welcome :-)It is much easier to use DOS8.3 notation. But be careful, the could change, that happend once with a windows update.
It is best to create the DOS8.3 names fresh each time. I got a batch from Robert Hook at the last MDL-workshop in 2015. This could help:
ECHO. ECHO. ECHO ======================================================== ECHO == Show mangled (DOS 8.3 format) path and file name ECHO == of path provided, ECHO == or current directory if no arg provided ECHO ======================================================== :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: mangled :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ECHO. ECHO. IF /i {%1}=={} ( CD ECHO. FOR /f "tokens=*" %%D IN ('cd') DO ECHO %%~sD ) else ( ECHO %1 ECHO. FOR %%A IN (%1) DO ECHO %%~sA ) ECHO. ECHO.
Thank for the DOS 8.3 tip, much appreciated
Hi Stephen Holmes,
Just some quick insights and recommendation that may help...
HTH,Bob
Stephen Holmes said:So I want to get started with C# and/or C++ app writing in MicroStation
to say C# and C++ in one sentence, when you are not "really professional developer" sounds weird. C# is not C++, these two languages are very different and in the context of development for MicroStation, C++ represents far more complicated task (but also much more powerful). So to start with C# makes sense, it brings many benefits (but of course plenty of disadvantages exist).
Stephen Holmes said:At this stage my aim is to write a simple MicroStation app in C# - just to draw one line from point A to Point B to make sure the developer environment is working OK,
For such aim, you do not need SDK at all. Well ... documentation yes, but nothing more. Everything what is required to develop normal MicroStation addin is installed with MicroStation installation. So it's about to analyze C# example(s) delivered with SDK and to create own one in Visual Studio. The only thing that is not obvious is how to define command table xml file, because .csproj has to be modified manually.
Stephen Holmes said:I have typed buildallexamples.bat All examples appear to have built successfully (a couple flashed up red with a dependency missing warning) I click N to not view the log files
Seriously? You received warnings and you are not interested in log file? The building process have to run smoothly without any warning, otherwise something is not set up or installed correctly.
Stephen Holmes said:I have a brand new windows 10 computer with all the latest windows 10 updates...
It will probably require to apply updates/fixes mentioned by Bob Hook, because SDK Update 13 shell depends on some features (registry entries) used by Microsoft in previous NET Framework and when only the latest versions are installed, they probably do not exist.
But as I wrote earlier, in fact you do need nothing than lets say chm files and (for inspiration) source code of examples.
Stephen Holmes said:Have I missed a document somewhere that tells me how to install and set up the environment to work with Viz Studio 2017?
I am not sure what do you expect that SDK will offer you.
When you choose to create managed addin for MicroStation, Visual Studio 2017 is all you need. In fact, you do not need even VS2017, any editor is enough and in extreme case, you can compile, ling and build NET assembly manually ;-)