MicroStation CONNECT Edition Help

DWG- and DXF-Related Configuration Variables

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

Configuration Variable Use
MS_ACADDIR Defines the directory containing AutoCAD. It is used to find the DWG support files, such as fonts.

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

MS_BLOCKLIST Defines the list of DWG and DXF files available for insertion as cells.

You can use this configuration variable when you click on Display All Cells in MS_CELLLIST icon in the Cell Library dialog.

MS_DWG_BACKUP Defines the directory for the DWG backup (.bak) files. If not set, the backup files are placed in the same directory as the DWG file.
MS_DWG_COMMANDPREFIX Defines a character or string of characters that can be used as a shortcut to the AutoCAD key-in commands .
MS_DWG_CREATE_SPACE_FROM_EDF If set to 1, any empty data field remains as a space.
MS_DWG_FEETUNIT_AS_ARCHENG If set, when a DGN file with Working Units set to Feet-Inches, Format set to Master Units, and Units on the Save As DWG/DXF Options dialog set to Master Units, the resulting DWG file has Engineering or Architectural units in AutoCAD. (If not set, the units are Decimal or Fractional.)

For details, see Setting units in files that will be saved to DWG files..

MS_DWG_FIELD_2005FORMATTING If defined and set to 1, the product only generates field information that AutoCAD 2005 supports.
MS_DWG_LSTYLE_FONTPATH Determines the location of the font file.
MS_DWG_LSTYLE_FONTNAME Determines the name of the font file, and therefore, the name of the font.
MS_DWG_MATCHORIENTATION_TOLAYOUT
  • If value is set to 0 or not set at all, the option of "match orientation to layout" on an annotation scale element is ignored. The element will be View Dependent, i.e. the element will respond to view rotation.
  • If value is set to 1, an annotation scale element with "match orientation to layout" turned on will be set to View Independent, i.e. the element will not respond to a view rotation. As a result, when a model is rotated, the element stays displayed horizontally. This applies to all models. While the element's display in the default model (aka model space) may not be desired, its display in a sheet model (aka layout) through a self-reference attachment (aka Viewport) may be.
  • If value is set to 2, an annotation scale element will be set to View Independent under these conditions:
    • the option "match orientation to layout" is turned on
    • the active model is a sheet model
    • the default model is not rotated

    The result is that if the active model is a layout in a DWG file and the model space is NOT rotated, the file will open and display correctly across all models. However, a DWG file that does not meet these conditions may not be displayed correctly in sheet models.

MS_DWG_MAX_ORPHANTAGS_PERSET Set the maximum number of tags per tagset for "orphan tags." An orphan tag is an attribute definition that is never instantiated in a block as it should in a DWG file. When opening a DWG file, all such “dangling” attribute definitions are collected into a tagset. For better performance, a tagset should be limited to a manageable size. Therefore, in the case of a large number of dangling attribute definitions, multiple tagsets are preferred rather than one large tagset. The default size is 100 per tagset.
MS_DWG_OEBREP_AS_BREP If set to 1, custom objects that are derived from Autodesk ShapeManager (ASM) entities, such as 3DSOLID, SURFACE, BODY, and REGION will be treated as ASM entities. As a result, these custom objects will be converted to Parasolid elements, just like the standard ASM entities. If not set (the default), the elements created on file open are controlled by the options under Custom/Proxy Objects in the Advanced section of the DWG Open Options dialog. CADWorx and Pipe Designer object enablers are impacted by this configuration variable.
MS_DWG_PGPFILE Points to a PGP file that contains shortcuts, or aliases, for AutoCAD commands.
MS_DWG_PRE2004_COLOR_TABLE Sets the color table for DWG files in the product. In version 2004, AutoCAD began displaying indexed colors with a slightly different (generally lighter) colors. The product also uses these new colors unless this variable is set.
MS_DWGAUTOSAVE If set to a positive number, specifies the number of seconds after the movement of the cursor stops in the DWG or DXF file that auto-save occurs. When this time elapses, an Alert window appears that asks whether the changes should be saved. The saving time can be significant, so you can defer the saving by clicking Cancel. If set to zero, no auto-save is done while the file is open. The file is automatically saved on exit or when switching to a different file.
MS_DWGAUTOSAVE_NODIALOG If set to a positive number, specifies the number of seconds after the movement of the cursor stops in the DWG or DXF file that auto-save occurs. When this time elapses the Alert window is skipped and the file change is automatically saved.
MS_DWGDATA 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 color table that contains the fixed AutoCAD colors used for display to the screen.
  • DwgPlotColors.tbl (Optional) — A color table that contains the fixed AutoCAD colors used for plotting.
MS_DWGFONTPATH Defines the path to AutoCAD *.SHX fonts if AutoCAD is not installed on the system.

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

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 Defines the full path file name that contains AutoCAD pattern definitions.
MS_DWGREF_ALLOWMASTERCOLORS Defines how the product 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 in the Preferences dialog Reference Category ( File > Settings > User > Preferences ). 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 reference file's color table. In this case, the Use Color Table setting has no effect.
MS_DWGSEED Defines the DWG seed file used when opening DWG files.
MS_DWGSEED_OVERRIDE Determines whether a user can modify the DWG Seed File setting on the Save As DWG/DXF Options dialog.

When the variable is not set or set to 0, the first time that the dialog opens, the default DWG seed file is set by the MS_DWGSEED configuration variable. You can choose a different seed file

When the variable is set to 1, You can only use the DWG seed file identified by MS_DWGSEED. You cannot choose a different seed file.

When the variable is set to 2, the default DWG seed file is set by MS_DWGSEED at the beginning of each session. You can choose a different seed file during the session.

MS_DWGSETTINGSFILE Points to the file that contains the settings for opening and saving DWG files.
MS_DWGSHEETMODELSEED Identifies the file containing the seed model for new sheet models in DWG files.
MS_DWGSHEETMODELSEEDNAME Identifies 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_MERGE_DISPLAYEDLEVELSONLY Modifies Copy Levels During Merge setting on the References tab of the Save As DWG/DXF Options dialog, Save As V8 Options dialog or Saved as V7 Options dialog.

When set (to 1), only those reference levels that are displayed in the selected view are merged into the output file.

If not set, and the Merge Displayed Levels Only setting is off (in the References tab), then all reference levels are merged into the output file.

MS_NO_DWG_BACKUP If set, backup files (.bak) are not created when you edit a DWG or DXF file.
MS_TRANSEED_OVERRIDE Determines whether a user can modify the DGN Seed File setting on the DWG Open Options dialog.

When the variable is not set or set to 0, the first time that the dialog opens, the default DGN Seed File is set by the MS_TRANSEED configuration variable. You can choose a different seed file.

When the variable is set to 1, You can only use the DGN seed file identified by MS_TRANSEED. You cannot choose a different seed file.

When the variable is set to 2, the default DGN seed fie is set by MS_TRANSEED at the beginning of each session. You can choose a different seed file during the session.

MS_WORKMODE Defines the workmode as either DGN or DWG.