Guide to Using DWG and Other Formats
Guide to Using DWG and Other Formats
Guide to Using DWG and Other Formats

DWG-related Configuration Variables

MicroStation includes configuration variables to help open, edit, and reference AutoCAD DWG data. The following list includes some of the configuration variables that affect MicroStation's DWG operations.

Configuration Variable

Use

MS_ACADDIR

This variable defines the directory containing AutoCAD. It is used to find the DWG support files, such as fonts.

When you first load MicroStation V8, MicroStation reads the registry, determines whether AutoCAD or AutoCAD LT is installed on your computer, and if present, sets this configuration variable.

MS_DWGAUTOSAVE

Determines the frequency, in seconds, of the auto save timer for DWG and DXF files. For example, if set to 300 (the default), an auto-save occurs approximately 5 minutes after the first change to the design. The minimum value is 30 seconds.

MS_DWGAUTOSAVE_NO_DIALOG

If set, auto-save occurs automatically, without displaying the default auto-save dialog box.

DWG and DXF format files take longer than DGN files to save. Therefore, by default MicroStation displays a dialog box that allows you to defer the auto-save operation. When the variable is set, the dialog box is not displayed.

MS_BLOCKLIST

This variable defines the list of DWG and DXF files available for insertion as MicroStation cells.

You can use this configuration variable when you turn on Display All Cells in Path in the Cell Library dialog box.

MS_DWG_BACKUP

This variable defines the directory for the DWG backup (.bak) files. If not set, the files will be placed in the same directory as the DWG file.

MS_DWG_COMMANDPREFIX

This variable can be set to a character or string of characters that can be used as a shortcut to the AutoCAD key-in commands. See Using a Command Prefix.

MS_DWGDATA

This variable points to the directory where the following files are stored:

  • "DwgSettings.rsc" — resource file containing all of the DWG settings

  • Files (*.dws) containing saved settings for opening and saving DWG/DXF files.

  • "DwgDisplayColors.tbl"(Optional) — A MicroStation color table that contains the fixed AutoCAD colors used for display to the screen.

  • "DwgPlotColors.tbl" (Optional) — A MicroStation color table that contains the fixed AutoCAD colors used for plotting.

MS_DWGFONTPATH

This variable defines the path to AutoCAD *.SHX fonts if AutoCAD is not installed on the system.

By default, MicroStation first uses the value of the MS_ACADDIR configuration variable to find AutoCAD support files. If this is unavailable, MicroStation uses individual variables, such as MS_DWGFONTPATH.

MS_DWGINSERTLAYER

Specifies the layer to which normal (unshared) cells and reference attachments are assigned when saving the open DGN file in DWG format. If this configuration variable is not defined, layer 0 is used.

MS_DWGNODIRECTPROXIES

Controls how direct proxies (Autodesk Architectural Desktop multiview block references) are displayed. If set to 1, only the proxy entity's graphics or bounding box are displayed. If set to 0, these proxy entities are displayed as 2D or 3D representations, and they can be modified.

MS_DWGOMITUNIQUEEXTENSION

If more than one file with the same name is present in the same directory, appends the extension to the output filename when saving the file.

For example, if the directory contains both sample.s01 and sample.s02, then the extension is included in the output filenames (sample_s01.dgn and sample_s02.dgn). If the directory does not include any files with duplicate names, then the extensions are be included in the output names. For example, if the directory contains only file sample.s02, this file is saved to sample.dwg.

MS_DWGPATFILE

This variable defines the full path file name that contains AutoCAD pattern definitions.

MS_DWG_PGPFILE

This variable points to a PGP file that contains shortcuts, or aliases, for AutoCAD commands. See Using a PGP File.

MS_DWGREF_ALLOWMASTERCOLORS

This variable defines how MicroStation uses color tables for DWG or DXF files attached as references.

  • If MS_DWGREF_ALLOWMASTERCOLORS is set to 1, the color tables for DWG or DXF references are handled as they are for DGN references: they are controlled by the Use Color Table setting (Workspace > Preferences > Reference category). When Use Color Table is on, the elements in each reference are displayed using the reference's color table. When Use Color Table is off, the elements in each reference are displayed using the active design file's color table.

  • If MS_DWGREF_ALLOWMASTERCOLORS is not set to any value, DWG or DXF references are always displayed using the active design file's color table. In this case, the Use Color Table setting has no effect.

MS_DWGSEED

This variable defines the DWG seed file used when opening DWG files.

MS_DWGSHEETMODELSEED

This variable defines the name of the file containing the seed model for new sheet models in DWG files.

MS_DWGSHEETMODELSEEDNAME

This variable defines the name of the seed model for new sheet models in DWG files.

MS_DWGSYSTEMDATA

Identifies the directory containing the DWG settings file Dwgsettings.rsc. Overrides the directory specified by MS_DWGDATA.

The display and plotting color tables (DwgDisplayColor.tbl and DwgPlotColors.tbl) can also be controlled by placing them in this directory.

MS_NO_DWG_BACKUP

If set, backup files (.bak) are not created when you edit a DWG or DXF file.

MS_WORKMODE

This variable defines the workmode as either DGN or DWG.

For more information, see Configuration Variables.