SDK shell commands

Last modified by Jan Šlegr on 2019/03/18 06:51

MicroStation SDK shell provides a set of commands (macros) that can be used in the same way as Windows shell (cmd) commands.

In MicroStation CONNECT Edition SDK Update 12, available commands can be grouped by their functionality in this way:

Example of SDKTIP macro output in MicroStation SDK development shell:

Example of SDKTIPS macro output

For readability, 8.3 format (C:\PROGRA1\Bentley\MICROS2\) used in commands was changed to full names form (C:\Program Files\Bentley\MicroStationCONNECTSDK\).

For some commands not exact implementation is used, but simplified form only. To see how exactly the macros are implemented, study bat files in SDK installation (specifically in bin folder).

Documents

These commands open documents delivered with MicroStation SDK.

Not all documents can be opened using the commands, there are some more in Documentation folder like MSTNPlatformNET.chm or ECObjectsAPI.chm. Use SDKDOCS command to navigate to Documentation folder.

CommandFunctionality / Implemented as
SDKHELPOpens MicroStationAPI help.
Command: C:\Program Files\Bentley\MicroStationCONNECTSDK\Documentation\MicroStationAPI.chm
SDKHELPNETOpens DgnPlatformNet help.
Command: C:\Program Files\Bentley\MicroStationCONNECTSDK\Documentation\DgnPlatformNet.chm
SDKREADMEOpens MicroStation SDK readme.
Command: explorer.exe C:\Program Files\Bentley\MicroStationCONNECTSDK\Documentation\Readme\index.html
VBAHELPOpens MicroStation VBA help.
Command: C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\MicroStationVBA.chm

Folders

These commands can be used to go quickly to specific folder. All commands use pushd which allows return back to original folder quickly using "reverse command" popd.

CommandImplemented as
MDLAPPSpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Mdlapps
MDLSYSASNEEDEDpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Asneeded
MDLSYSREQUIREDpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\MdlSys\Required
MSpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\
MSWORKSPACESpushd C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\WorkSpaces\
SDKpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\
SDKASSEMBLIESpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Assemblies\
SDKBINpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\bin\
SDKDOCSpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\Documentation\
SDKEXAMPLESpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\examples\
SDKINCpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\include\
SDKLIBpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\library\
SDKMKIpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\mki\
SDKOUTDIRpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Mdlapps\
SDKPRODpushd C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\
SDKREMAPpushd C:\Program Files\Bentley\MicroStationCONNECTSDK\MigrationTools\
SDKTEMPpushd C:\Users\jansl\AppData\Local\Temp\Bentley\MicroStationSDK\
VCBINpushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\
VCINCpushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\
VCLIBpushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\
VCTOOLSpushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\
VSDIRpushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\

Informations

These commands provides specific information about SDK configuration and development environment

CommandImplemented as…
SDKCONFIGLists SDK shell configuration.
Command: cls $T @echo. $T doskey /history $T @echo. $T doskey /macros | sort $T @echo. $T for %a in (SHELLCMDLINE SDK SDKPROD SDKTEMP SDKASSEMBLIES SDKBIN SDKDOCS SDKEXAMPLES SDKINC SDKLIB SDKMKI SDKREMAP SDKOUTDIR SDKBUILDTOOL SDKTITLE SDKVER) do @set %a | findstr -vi "MS_ PATHEXT" $T @echo. $T $1
SDKENVLists arguments used to start SDK shell.
Command: echo Startup SHELL and ARGS: %SHELLARGS%
SDKMACROSLists all macros (commands) available in the shell.
Command: cls $T @echo. $T doskey /macros | sort
SDKTIPSClears shell and displays SDK tips.
Command: $T for /f "tokens=*" %a in ('where sdktips.txt') do (cls & echo [SDKTIPS] & echo. & type "%a" & echo.)

Links

These commands open web browser at specified address.

CommandServer or web page / Implemented as…
BDNVIDEOSBDN videos on YouTube
Command: start https://www.youtube.com/playlist?list=PLZVg-nvIew0e4p8Qjx4r0XXVQqc3zbYtG
BENTLEYFTPOpens Windows Explorer in incoming Bentle ftp folder. Can be used to share files with Bentley.
Command: explorer.exe ftp://ftp.bentley.com/pub/incoming
BENTLEYVIDEOSBentley Systems channel on YouTube
Command: start https://www.youtube.com/channel/UCzEPv7twptpXXDVvAYplJEA
SDKANNOUNCEMENTSList of announcements about MicroStation SDK
Command: explorer.exe https://communities.bentley.com/products/microstation/f/microstation-announcements-forum/tags/SDK
SDKASKQUESTIONSMicroStation Programming Forum best practices
Command: explorer.exe https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/77384/please-read-microstation-programming-forum-best-practices
SDKFORUMMicroStation Programming forum
Command: explorer.exe https://communities.bentley.com/products/programming/microstation_programming/
SDKIDEASMicroStation Programming Ideas forum
Command: explorer.exe https://communities.bentley.com/products/programming/microstation_programming/i/microstation-programming---ideas
SDKLEARNMicroStation SDK trainings on Bentley LEARN Server
Command: start https://learn.bentley.com/app/Public/ViewLearningPathWithMasterCourseExpanded?lpId=112568
SDKWIKIMicroStation Programming wiki
Command: explorer.exe https://communities.bentley.com/products/programming/microstation_programming/w/wiki

Search tools

These commands allow to search (full text search) in SDK files.

CommandFunctionality
SDKSEARCH <string>Search for string in SDK files (include files, chm, examples…) .
SDKSEARCH <string> VERBOSESearch for string in SDK and also product (MicroStation) files and workspaces.

Build tools

These commands can be used to build delivered examples, as well as own projects.

CommandFunctionality
BUILDALLEXAMPLESCompiles all delivered examples using bmake. Can be used to validate a build environment.
BUILDCompiles code using bmake and creates basic log.
BUILD VERBOSECompiles code using bmake and creates detailed log.

Tools & other

CommandFunctionality
F [folder]

Lists content of specified folder and all subfolders.
When the folder is not specified, an active folder is used.

Command: dir /s /b $*
S <strings> <file name(s)>

Searches for patterns of text in files using this setting:

  • (s) in current folder and all subfolders,
  • (n) prints  the line number of each line that matches,
  • (i) ignores the case of the characters when searching for the string,
  • (p) skips files with non-printable characters,
  • (a) specifies color attributes with two hexadecimal digits (1E).
Command: findstr.exe -snipa:1E $*
SB <strings> <file name(s)>

Searches for patterns of text in files using this setting:

  • (s) in current folder and all subfolders,
  • (i) ignores the case of the characters when searching for the string,
  • (m) prints only the file name if a file contains a match.
Command: findstr.exe -sim $*
SDKLOGSOpens Windows Explorer in folder, where SDK log files are saved by default.
Command: explorer.exe C:\Users\jansl\AppData\Local\Temp\Bentley\MicroStationSDK\
Tags:
Created by Jan Šlegr on 2019/03/18 06:43
  

Tag Cloud

No page has been tagged yet

Jan Šlegr [Labyrinth Technology] - for information about license, see About web > License