Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
MicroStation Wiki Batch Convert Utility
    • Sign In

    • +MicroStation Wiki
    • -Administration Wiki
      • Adding "Display Style List" to custom Toolbox
      • +Administration - Legacy Content
      • Answers for the Levelly Challenged
      • Batch Convert Utility
      • Bentley Tablet Driver And CalComp DrawingBoard
      • Bypassing Port Problems In Windows 2000 And Windows XP
      • Cannot find survey ft option in Design File Settings > Units
      • Configuration Variable Processing
      • Configuration Variables In MicroStation V8
      • Creating Tool Icons
      • Customize item missing from Workspace menu
      • Customize Toolbox - Tool opens new Toolbox
      • DGN file association in Windows 10 (MicroStation Does not appear in list)
      • DGN Index Service - How to set up
      • DGN Index Service Setup ended prematurely – error 1603
      • Enabling Lock Pages In Memory Under Windows 7 and Vista
      • Error - Cannot locate a default SHX font. Please install msdefault.shx
      • Error - Unable to load/create dialog item of type 'IconCmd', id
      • Error 1402. Could not open key
      • Error 1603 during install
      • Error 1610 during install
      • Error 1625 during install
      • Error message when starting MicroStation, "ucf not found"
      • File Associations
      • File Correction and Audit Tools
      • Getting Started With The Standards Checker
      • Haven't Upgraded To The MicroStation V8 Format Yet
      • How to Back Up and Restore User Preferences
      • How to Copy User Preferences and User Configuration Files to a new or different PC
      • How to quickly add a number of folders to Microstation's reference files search paths
      • How To Reset User Preferences and Delete MicroStation's Temporary Files
      • Installing MicroStation V8 XM Edition silently
      • Installing MicroStation V8i (SELECTseries 3) Without an Internet Connection
      • Installing MicroStation V8i silently
      • Is there any easy way to determine key-ins or variable names?
      • Key-in command to define different pattern setting options
      • Keyin to encrypt dgn files
      • MicroStation - Creating a Custom Colour Book
      • MicroStation Command Line Options And Switches
      • MicroStation Failed to Start
      • MicroStation file access issues with shared network drives
      • MicroStation Memory Management
      • +MicroStation V8i Variables
      • MicroStation Virtualization FAQ
      • Migrating Customizations to MS V8i
      • Migrating Customizations to MS XM
      • MSDebug File
      • MSXML Issue
      • Networking Workspaces
      • Networking Workspaces the easy way
      • New Variables
      • Overriding And Resynchronizing Level Attributes
      • Restore MicroStation to Factory defaults
      • Script error during MicroStation Installation
      • Serving Up Efficiency
      • Sharing Your Workspace
      • System Fault 5 MDL abort in DITEMS
      • The Power Of The Workspace
      • To also see hidden Config-Variables
      • Unable to connect to an Oracle Database
      • Understanding File Locations And Reference Attachments In MicroStation
      • Updating To MicroStation V8 Format
      • Upgrading From 08.09.02.52 To 08.09.02.77
      • Windows Explorer ProgramData folder
      • Workmodes DGN/DWG
      • Workspaces on the Network
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • +Programming Wiki
    • +Visualization Wiki

     
     Questions about this article, topic, or product? Click here. 

    Batch Convert Utility

      Product: MicroStation
      Version: V8, XM, V8i, CONNECT
      Environment: N\A
      Area: Administration
      Subarea: N/A

    Background

    Batch Convert is a utility delivered as part of MicroStation V8. The Batch Convert application is used to convert individual files or entire directories of files from any of the CAD formats supported by MicroStation to any other supported format. File formats currently supported include MicroStation/J, MicroStation V8, AutoCAD DWG and AutoCAD DXF.

    To start the Batch Convert Application, select the Utilities > Batch Converter... entry from the Main Menu. The Batch Convert dialog will appear (Figure 1).

    Figure 1 BatchConvert dialog

    Setting up a batch conversion job

    In addition to DGN or DWG files, if the output format is set to V8, the first step in using this utility is to set up a Batch Convert job. Note that if the output format is set to MicroStation V8, you will be able to convert pre-MicroStation V8 cell libraries to the MicroStation V8 format. You can also browse for the destination directory using the Browse icon. If the directory entered does not exist, Batch Convert will create it when the job is processed.

    Next, identify your conversion tasks by clicking on the Add Files or Directories icon. That brings up a file selection dialog (Figure 2) with a few additional features that are specific to the Batch Convert application.

     

    Figure 2 Selecting files for batch conversion

    This dialog allows multiple selection of both files and directories. The Add button automatically enables when a file or directory selection is made. Clicking this button adds the selected files or directories to the list displayed in the lower section of the dialog. If directories are selected and the Include Subdirectories toggle is checked on, the directory name is followed by the wildcard string, *\ to indicate that the subdirectories will be included in conversion operations.

    When you have selected the files and directories that need conversion, click the "Done" button. At this point, the source files and directories are added to the table in Batch Convert dialog, with the output format and directory as selected in the first step. If the source, the output format or output directory for any row needs to be changed, the entries in the table can be directly edited to correct the data. Alternatively, the Apply to Selection button can be used to incorporate the default output format and directory from their settings at the top of the dialog.

    If an entry in the source column contains a directory, it can be edited to include a standard file filter. For example, if you wanted to convert all the files with the extension .d04 from directory d:\007625\ and its subdirectories, the source column entry would read d:\007625\*\*.d04.

    When an entry in the source column is a directory, all files from that directory that have an extension in the list defined by MS_BATCHCONVERT_COPYEXT will be copied to the destination directory. For example, if you want Batch Convert to copy all the files with the extension .rsc or .txt to your output directory, define MS_BATCHCONVERT_COPYEXT as rsc;txt. By default, MS_BATCHCONVERT_COPYEXT is not defined, and only files in one of the design formats are processed.

    Notes on the use of Batch Convert

    • Different rows can have different output formats and destination directories.
    • The order of conversion is indicated by the sequence number column (which has the heading "#").
    • Rows can be removed from the conversion table using either the Remove Conversion selection in the Edit menu, or the Remove icon.
    • Conversions can be sorted by any of the columns, but the Edit menu options that modify the order are enabled only when sorting by the "#" column in ascending order.
    • If DWG or DXF files are involved as source files, the settings accessed through the DWG Open Options selection on the Edit menu are used.
    • If any files are to be output in those formats, the settings accessed through the DWG Save Options selection on the Edit menu are used.
    • The Log file Options selection on the Edit menu is used to set a log file and to specify whether it should be emptied prior to conversion processing.

    Saving and recalling Batch Convert jobs

    If you plan to perform file format conversions more than once, you should consider saving your batch convert setup as a "job." To do this, click the Save Batch Convert Job icon or select the Save option from the File menu. The default extension for batch conversion job files is .bcnv. Once you have saved a batch conversion job, you can recall it by clicking on the Open Batch Convert Job icon or selecting Open from the File menu. The DWG open and save options, the log file name and all conversion tasks are saved to the batch conversion job file. The batch conversion job file is a text file similar to Windows initialization files and can be edited with a text editor, if desired (Figure 3).

     

    Figure 3 Typical batch conversion job file

    Processing Batch Convert jobs

    When the batch conversion job is set up as desired, the conversion process can be started by clicking on the Process Batch Convert Job icon or selecting File > Process... from the main menu. If you want to convert only a portion of the job, select the rows that are to be processed and turn on the Process Selections Only toggle.

    When the conversion is started, a dialog appears displaying a list of the files to be converted and the progress of the overall conversion job (Figure 4).

     

    Figure 4 Batch conversion status dialog

    Notes on Processing Batch Conversion jobs

    • If the source format is the same as the output format, the source file is simply copied from the input location to the output directory.
    • When feasible, Batch Convert uses the source file name for the output file. When the source is in MicroStation/J or MicroStation V8 format and the output is an AutoCAD file, the output extension is automatically set to .dwg or .dxf as appropriate. If there are multiple files with the same root name (differing only in extension) in the source directory, the extension is incorporated into the output file name. This is due to the fact that all AutoCAD files must have the .dwg or .dxf extension.
    • Batch Convert checks to see if the output file exists, and, if so, whether it is the same date as the source file. If so, it does not bother to convert or copy the source file to the output.
    • The file time of the output file is set to match the file time of the input. This feature makes it feasible to run the batch conversion application for a job frequently, updating the output versions of only those source files that have changed. It also makes it possible to restart a batch conversion job. When the destination file is up to date, the Status column indicates that fact.
    • When the conversion process is started, the Convert button automatically changes to "Pause." Clicking Pause directs Batch Convert to pause after converting the current file. The button then changes to Resume. The application never stops in the middle of converting a file.
    • If MicroStation/J or MicroStation V8 files are being converted to AutoCAD files, and the Save References As DWG/DXF toggle in the DWG Save Options is turned ON, then the references of each file are processed, as well as the master file. In certain instances, this results in the automatic conversion of some files that are in the batch conversion job before they are reached in the table. In such a case, the Status column will change to Already Converted when the batch conversion process reaches such a file.
    • When the conversion process is finished, the Convert/Pause/ Resume button changes to read Done, and the Cancel button is disabled. Clicking Done closes the dialog.
    • Clicking the Cancel button stops the batch convert job after the current file is finished.
    • As files are converted, the status of the conversion is displayed in the Status column, and the time required for the conversion or copy is displayed in the Time column.
    • Details about the conversion process are written to the log file. This log file can be opened using any text editor, such as Notepad.
    • When the conversion process ends, the log file table can be sorted by any column. In particular, it can be quite useful to sort by the Status or Time fields.

    Running Batch Convert without graphics

    If desired, the batch conversion application can be run from a Command Shell. To use Batch Convert in this mode, first create and save a batch conversion job in the manner described above. Next, exit MicroStation and open a Command shell. The easiest way to do this is to use the MicroStation V8 Development Shell option in the MicroStation program group.

    From the Command shell prompt, enter the command:

    msbatch batchconvert <batchconvertjobfile>

    where <batchconvertjobfile> is the full file specification of the batch convert job file. In this case, progress messages are output to the MicroStation console window. These messages are also written to the log file.

    See also

    Other language sources

      Original Author: Bentley Technical Support Group
    • convert
    • batch
    • MicroStation
    • multiple
    • processing
    • DGN
    • Files
    • DWG
    • SAT
    • Share
    • History
    • More
    • Cancel
    • Dan Koval Created by Bentley Colleague Dan Koval
    • When: Fri, Sep 6 2013 9:36 AM
    • Andrew Bell Last revision by Bentley Colleague Andrew Bell
    • When: Fri, Sep 15 2017 12:55 AM
    • Revisions: 10
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies