Original Article Date: Nov 13, 2002
Matt Phillips contributes this little workflow on verifying and repairing V7 design files. MicroStation V7 Administrators will appreciate that it can be deployed from a server and that a journal file is created for each design that's analyzed.
Please use extreme caution when executing any unknown EDG script. It's strongly advised to work with copies of your files and ensure that you have current backups. Also, depending upon the nature of problems that may be encountered in your file(s), there is no gaurentee that this method will provide a solution.
The following workflow will allow administrators to run an EDG script against entire directories of files. The script itself is a general verify and repair sequence that can be stored as EDG commands in a little txt file. In my case, I've called the file
This EDG script file can be placed in MicroStations EDG directory or be pointed to at the EDG prompt which I'll discuss a little later. Note that it will record all actions made to a design file and then create a companion text file for each design file processed. This companion text file is actually called a journal file and will be created in the same folder as the design file itself. It will also have the same file name but have an RX extension....and since it's a text file, you'll be able to open it with any text editor to see the details.
To process a single file:
To get EDG started, you can do one of the following:
Once the file has been opened with EDG, keyin @ followed by the location of the script file. For example:
As soon as you press the Enter key, MicroStation will process the script file and generate the journal file.
To process an entire folder of files:
From the Command Window navigate to the folder that contains your design files. Then keyin the following at the prompt:
for %x in (*.dgn) do d:\bentley\program\edg\edg %x @c:\rxall
Of course, this keyin is looking for the EDG script file to be in the root folder of C: drive. The command window will look like this - note that in this case the files located in d:\testing\v7\ are the ones being processed:
To process a folder and sub-folders:
According to DOS Help the /R switch will walk the directory tree rooted at [drive:]path and executes the FOR statement in each directory of the tree.
Knowing this, the following keyin will process the directory your DOS prompt is set to and any sub-folder:
for /R %x in (*.dgn) do d:\bentley\program\edg\edg %x @c:\rxall
For example, in the following image all files in d:\testing\v7\ and it's sub-folders are processed.
AskInga Article #130