Hello,
I am using Excel to write a series of key-ins. The idea is to unclip, shift, and reclip a couple of references, then save a copy of the file with a given name, and repeat. It also attaches, moves, and scales a couple raster images, detaching them after the save (so before the next one is attached). That way, we can automate the generation of 250+ sheets using input values for the shift amounts, raster filepaths, and file names in Excel, with the option to update said values and regenerate the sheet set with a new script if need be. By putting the sheet information (plans, title blocks, etc.) in reference files, we can revise as much as possible in the references without manually revising all 250+ sheets or regenerating the script if we don't have to.
However, in my newest version of the script, OpenRoads CONNECT Edition crashes without successfully running the script. It's not an issue with the script size, as I have been testing with a single iteration (copied below), but the last version worked with all 250+ iterations. It might be an issue with syntax or me using the wrong commands, but I have entered sections of the code below (both as a .txt and directly into the key-in tool), and all parts of the script seem to work individually, so I am not sure what the issue is with the cumulative script. I am learning all of this key-in wizardry for this project (and am still a novice in ORD/MSTN in general), so maybe I'm missing something, and any help would be much appreciated, thanks. Note that some file names/paths have been generalized/edited after the fact to avoid disclosure.
My first thought is...how are you using excel to generate this? MicroStation command files for batch processing need to be plain TXT files. It's possible that this has accidentally gotten saved as any other file format.
My next thought is, why are you creating one long string of keyins? Wouldn't it be easier to read/follow/debug if each command were its own line, or at least each file manipulation were its own string?
This could be something handled better through MicroStation VBA. There might be a little more overhead in learning to code it, but the code would be more robust.
It's a little hard to follow this, but I don't see anything that jumps out at me as unrunnable.
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2
Excel has some commands to concatenate columns.
I've personally used this to create a batch script to run a command on multiple files
column 1 column2 column 3
command filename resulting keyin
Bryce Reynolds said: single iteration (copied below
It might be best to post on the dedicated programming forum for help:
MicroStation Programming Forum
I have used Excel to create command scripts, but I found it easier to make multiline scipt files which were read and applied one line at a time. the keyin a @full_path_script_filename.scr would read and execute the lines of the file. For simplicity. we would make a temporary folder at the root of the drive with all 8.3 file names, so there was no need for double quotes.
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration