Seamlessly Integrations of Visual Studio and MicroStation - A more reliable, productive, robust and simply more enjoyable development experience.
Table of Contents
- Introduction
- Supported Bentley Products
- Features
- C# and VB .Net Project Templates
- C++ Project Templates
- C# and VB .Net Item Templates
- Import Native C++ applications to Visual Studio
- Search Bentley forums easily within Visual Studio
- Keyin Command Table (Command.xml) Intellisense
- Snippets for MicroStation and OpenRoads
- Resource Links
- Open MicroStation folders
- Environment Variables
Introduction
Welcome to Visual Studio Tools for MicroStation.
Supported Bentley Products
Additional applications you may try.
C# and VB .Net Project Templates
Create the following C# and VB. Net projects.
Template |
Description |
MicroStation Add-In |
Create a MicroStation add-in without a command table. |
MicroStation Add-In Command Table |
Create a MicroStation add-in with a command table for using keyins. |
MincroStation Windows Form Application |
Create an external Windows application for MicroStation. |
MicroStation Wpf Application |
Create an external WPF application for MicroStation. |
Type "MicroStation" in the Create a New Project dialog box to begin.
Build your project
C++ Project Templates
Create the following C++ projects.
Template |
Description |
MicroStation Managed |
Create a MicroStation managed/CLR add-in without a command table. |
MicroStation Managed Command |
Create a MicroStation managed/CLR add-in with a command table for using keyins. |
MicroStation Native |
Create a Microstation native add-in without a command table. |
MicroStation Native Command |
Create a Microstation native add-in with a command table for using keyins. |
C#, VB .Net, and C++ Item Templates
Add the following C# or VB .Net items to your project. The item templates
are based on three categories: Code, Window Forms, and WPF
Code
Template |
Description |
Class |
Add an empty class |
Key-In Command Table |
Create a Commands.xml and a KeyinCommands.cs file mapped to the Commands.xml. One command table is allowed per project. |
Placement Tool |
Add an item that inherits from DgnPrimitiveTool class to create and place elements. |
Scan Criteria Extension |
Add this utility extension to assist in creating a scan criteria. |
Selection Tool |
Add an item that inherits from DgnElementSetTool class to modify elements. |
Window Form
Template |
Description |
IPrimitive Command Windows Form |
Add an item to implement the IPrimitiveCommandEvents interface implements a new element-creation command with a Windows Form tool settings. |
Placement Tool Windows Form |
Add an item that inherits from the DgnPrimitiveTool class to create and place elements with a Windows Form tool settings. |
Selection Tool Windows Form |
Add an item that inherits from the DgnElementSetTool class to modify elements with a Windows Form tool settings. |
Windows Form |
Add an item to create a simple Windows Form |
WPF
Template |
Description |
IPrimitive Command (WPF) |
Add an item to implement the IPrimitiveCommandEvents interface implements a new element-creation command with a WPF User Control tool settings. |
Placement Tool (WPF) |
Add an item that inherits from the DgnPrimitiveTool class to create and place elements with a WPF User Control tool settings. |
Selection Tool (WPF) |
Add an item that inherits from the DgnElementSetTool class to modify elements with a WPF User Control tool settings. |
Toolbar (WPF) |
Add an item to create a Toolbar using a WPF User Control. |
User Control (WPF) |
Add an item to create a WPF User Control. |
Add a new item
And choose to add the item to the MicroStation Keyin Command Table or not
Watch it here on YouTube. Click the image...
**Watch it debug here on YouTube. Click the image...**
Import Native C++ applications to Visual Studio
You can import existing MicroStation C++ applications directly into Visual Studios.
From the Visual Studio main menu, click Tools|Bentley|Import Bentley Native App and select the make (.mke) file for the project you want to import.
Imported Bentley C++ projects make use of a batch file that is created when creating your first project. There are three batch files created at C:\ProgramData\VSTMC\
File |
SDK |
AECOsimBuild.bat |
AECOSim SDK |
MSCEBuild.bat |
MicroStation Connect Edition SDK |
ORDBuild.bat |
OpenRoads Designer SDK |
Search Bentley forums easily within Visual Studio
Keyin Command Table (Command.xml) Intellisense
In order to enable the Keyin command table IntelliSense by default, the KeyinTree.xsd file should be placed in the
C:\Program Files\Microsoft Visual Studio\2022\<Visual Studio Product>\Xml\Schemas folder. This will be done automatically for you if you create at least one project in administrative mode.
A copy of KeyinTree.xsd is saved to C:\ProgramData\VSTMC\KeyinTree\ for reference.
If KeyinTree.xsd is installed, it should be shown in the Visual Studio XML schema list.
Snippets for MicroStation and OpenRoads
Additional resource links for Getting Started with the Bentley SDK, the Bentley Forums, and training.
Set up Environment Variables
The following environment variables need to be set prior to starting Visual Studio for the application to run correctly.
Variable |
Value |
Example |
BentleyApp |
Name of Bentley application |
OpenRoadsDesigner.exe |
BentleyAppPath |
Bentley application path |
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\ |
BentleyIncludePath |
Bentley app SDK include files |
C:\Program Files\Bentley\%BentleySDK%\include\ |
BentleyLibraryPath |
Bentley app SDK library files |
C:\Program Files\Bentley\%BentleySDK%\library\ |
BentleyMDLPath |
Bently app MDL Path. Apps build to this path. |
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\Mdlapps\ |
BentleyNativeBatchFile |
Batch file to process C++ apps |
C:\ProgramData\VSTMC\ORDBuild.bat |
BentleyReferencePath |
Default reference paths |
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\Assemblies\ |
|
|
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\Assemblies\ECFramework\ |
|
|
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\Assemblies\ECFramework\extensions\ |
|
|
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\ |
|
|
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\Assemblies\ECFramework\en\ |
|
|
C:\Program Files\Bentley\OpenRoads Designer CE 10.10\OpenRoadsDesigner\Cif\ |
BentleySDKPath |
Bentley SDK Path |
C:\Program Files\Bentley\%BentleySDK%\ |
BentleySDK |
Bentley SDK (Optional for variable %BentleySDK%) |
MicroStationCONNECTSDK |
Linkedin