Hello Bentley,
There already exists some options to run command scripts on the DGN or application at startup using the Command Line, but can this be simplified?
I have already read these two forum items but in honesty it can be much simpler.
https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v22/en/PreferencesOperation.html
Why not have a configuration variable with the value being one or more file paths to text files containing MS key-Ins/Commands?
If the configuration variable is not defined then nothing happens, no command scripts are launched.
AKA. The proposed Config variable is defined with two scripts below:
MS_CommandScript = C:\path\to\Script_1.txt; C:C\path\to\Script_2.txt
There would need to be some intelligence in how the commands are executed; for example if a command takes a bit of time to complete and update the file then the next command would not start until the previous one has finished in order to avoid overlap or command clutter.
I think a lot of users would appreciate simplifying this, instead of extending the Command Line Switch length and limiting options to only one script?
A lot more could be done silently as well if MSCE could be operated in a 'Windows Service Mode' [new functionality], and files can be dragged-and-dropped onto an MSCE Service Mode via GUI with command scripts executed silently.
Have a nice day.
There's one more thing, A second config variable to run key-in/commands on file close.
MS_CommandScript_DGNClose
Same rules per above; if CFG var has no path to txt file/or not defined, then it is ignored like any other CFG variable. When Commands in the text file script queue are executed they have intelligence applied to wait for previous command to complete to avoid clutter/overlap.
Commands in the script that don't parse don't get executed.
The script can have comments that begin with hash #
Just a further note for this idea,
If possible could there be three options to run command scripts via configuration? similarly to how we can run VBA scripts already.
A script that runs one-time at application startup on the first CAD file, a script that runs on CAD file opening, and a script that runs on file close: AKA when I close the file the commands run on the file before it closes.