Assistance with a Crashing Key-In File

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.

reference move MASTER;Point Acsabsolute -94.4737096,39.1116229;xy=330,320;reference clip boundary MASTER;xy=130,120;selview 1;reset;reference clip delete TITLEDATA1;selview 1;reset;reference move TITLEDATA1;xy=0,0;xy=-60,0;reference clip boundary TITLEDATA1;xy=615,120;selview 1;reset;reference clip delete TITLEDATA2;selview 1;reset;reference move TITLEDATA2;xy=0,0;xy=-60,0;reference clip boundary TITLEDATA2;xy=725,120;selview 1;reset;reference clip delete HEADER;selview 1;reset;reference move HEADER;xy=0,0;xy=-220,0;reference clip boundary HEADER;xy=640,520;selview 1;reset;raster attach C:\ustn\Project\Rasters\Folder1\1.jpg;raster move;xy=562325.7246,537308.4974;xy=130,520;reset;raster scale;xy=130,520;xy=130,520;xy=130.3333,519.6667;xy=190,460;reset;raster attach C:\ustn\Project\Rasters\Folder2\1.jpg;raster move;xy=562325.7246,537308.4974;xy=410,520;reset;raster scale;xy=410,520;xy=410,520;xy=410.3333,519.6667;xy=530,400;reset;backup C:\ustn\Project\outputfile1.dgn;reset;reference clip delete MASTER;selview 1;reset;reference move MASTER;xy=330,320;Point Acsabsolute -94.4737096,39.1116229;reset;delete element;xy=190,460;reset;delete element;xy=530,400;reset;
Parents
  • 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

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
Reply
  • 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

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
Children
No Data