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

Cells

MicroStation shared cells are similar to AutoCAD blocks.

A shared cell is a cell whose elements are stored only once in the DGN file, regardless of how often the cell is placed within the DGN file. Any change made to one instance of a shared cell reflects in all instances of that shared cell. For an unshared “normal” cell, on the other hand, the library definition is stored in the DGN file each time the cell is placed. In AutoCAD, all blocks behave like shared cells. There is no analogy to a normal cell.

Working with cells that will be saved to DWG files

When you save a DGN file to DWG format, you can use existing cell libraries to help develop the design. Generally, you should use shared cells, as normal cells are not supported in the DWG file format. If your DGN model contains normal cells, however, they will be converted to shared cells in the DWG file.

The following topics provide more details about working with cells:

Annotating cells: using enter data fields and tags

During the conversion to DWG format, cells migrate with no problems, unless they contain enter data fields. AutoCAD does not have an equivalent feature. To annotate cells in DGN files that will be saved to DWG file, use tags rather than enter data fields. For details, see Tags.

Using enter data fields in cells

For drawing annotation, MicroStation users have traditionally embedded enter data fields in cell symbols. For example, items like valve designators and door symbols have often been created using this type of cell annotation.

When you save the DGN file as a DWG file, the enter data fields that are not used in cells are converted to text. However, the enter data fields in cells are handled somewhat differently.

In a DGN file, an enter data field may be used to annotate a normal cell (enter data fields cannot be used with shared cells). During conversion, MicroStation converts an enter data field that is part of a cell to an AutoCAD attribute linked to a block. In AutoCAD, the enter data field's value appears as an attribute positioned precisely where the enter data field was located in the MicroStation cell.

Like MicroStation tags, all AutoCAD attributes have an associated label or name. Since MicroStation enter data fields are not defined with a label, the Save As process automatically generates a label for each enter data field that is converted to an attribute. The new label is the cell name plus a sequence number.

These automatically-generated attribute labels may be undesirable, particularly if DWG specifications require specific attribute usage and labels. Since MicroStation cannot store labels for enter data fields, you should not use enter data fields in situations where specific labels are required. Instead, incorporate tags into the cell definition, as these become block attributes when the DGN file is converted to DWG.

Understanding insert layer control for normal cells

The insert layer for a normal (unshared) cell saved in the DWG file corresponds by default to the level of the cell's first component element.

In certain cases it may desirable to override the default insert layer. Consider, for example, what can happen when levels within a viewport (model attached to sheet) are turned off and Level Display is set to a view number. In this case, unless an override is specified, if an insert exists on a layer that is frozen it will not be displayed at all even if the component layers are displayed.

To override the default insert layer for normal cells, set the configuration variable MS_DWGINSERTLAYER to the desired layer name. For example, assigning MS_DWGINSERTLAYER to “MSINSERT” results in the assignments of inserts to the layer "MSINSERT". If this layer does not exist, it will automatically be created.

MS_DWGINSERTLAYER is used to override the default insert layer for reference attachments as well as normal cells.

Working with DWG blocks in MicroStation

Blocks in a DWG file behave like shared cells when the file is opened in MicroStation.

These topics provide more details about working with blocks in MicroStation. You can:

Attaching the DWG file as a cell library

A DWG file can be attached to a DGN or DWG file as a cell library. The individual DWG blocks are converted to shared cells that you can place in your model.

To place shared cells (blocks) from a DWG file
  1. From the Element menu, choose Cells.
    The Cell Library dialog box opens.

  2. From the dialog box's File menu, choose Attach.
    The Attach Cell Library dialog box opens.

  3. From the List Files of Type option menu, select DWG format. Navigate to the DWG file to be attached, and click OK.
    On the Cell Library dialog box, the DWG file appears in the list box. The Where column identifies the source as Blck.

  4. Turn on Use Shared Cells.
    The blocks in the DWG file are listed as shared cells. The Where column identifies the source as LbSh.

  5. Double-click a cell to make it the active cell.

  6. In the Cells tool box, select the Place Active Cell tool and position the cell as desired.

  7. Usually the origin is (0,0,0) in the DWG that is being placed as a cell. However, if the AutoCAD INSBASE (insertion base) system variable is set, it is used as the origin.

Identifying DWG files that can be used as cells

The MS_BLOCKLIST configuration variable can be used to identify a list of DWG files that can be inserted as cells. In this case, the contents of the entire DWG file is placed as a shared cell.

To place cells from a list of DWG files
  1. From the Workspace menu, choose Configuration.
    The Configuration dialog box opens.

  2. On the View/modify configuration variables list box, select the variable MS_BLOCKLIST.

  3. Click Edit.
    The Edit Configuration Variable dialog box opens. The Edit Mode should be set to Overwrite.

  4. In the New Value field, enter the path to the *.DWG files that you want to place as cells, and click OK.
    For example, enter ..\workspace\projects\untitled\*.dwg.

  5. From the dialog box's File menu, choose Save.

  6. Click OK to exit the Configuration dialog box.

  7. From the Element menu, choose Cells.
    The Cell Library dialog box opens.

  8. Click Display All Cells in Path.
    The *.DWG files are displayed.

  9. Double-click on the cell to make it the active cell.

  10. In the Cells tool box, select the Place Active Cell tool and position the cell as desired.

Exporting blocks to a cell library

The EXPORT CELLS SHARED key-in can be used to export blocks (or shared cells) from a DWG file to a new MicroStation cell library.

To export blocks/shared cells from the open file to a cell library
  1. Key in EXPORT CELLS SHARED [destinationCellLibraryName].
    For example, to export the shared cells in the current file to a file called blockCellLibrary.cel, enter: EXPORT CELLS SHARED c:\myDgns\blockCellLibrary.cel.

  2. To export blocks or shared cells from a group of files, use the EXPORT CELLS SHARED key-in with the Batch Process utility.

Working with multiview block references in MicroStation

Multiview block references created by Autodesk Architectural DeskTop display different block definitions in different views, in a manner similar to MicroStation TriForma's compound cells. MicroStation displays these proxy entities by using the general 2D or 3D representations of models. Unlike most proxy entities, which are automatically locked and cannot be modified, multiview block references can be moved, rotated, or scaled with standard MicroStation tools.

To disable this behavior, set the configuration variable MS_DWGNODIRECTPROXIES. When this variable is set, only the proxy entity's graphics or bounding box are displayed.

Working with cells in DWG workmode

In DWG workmode, the way that you work with cells is essentially the same as in DGN workmode. All new cells are placed as shared cells, since the DWG file format does not support normal cells. In this workmode, you can also attach a DGN, DWG, or CEL file as a cell library and insert its contents.

Understanding element symbology in cells

In cells, element symbology includes settings for color, line style, and line weight. In MicroStation, cell element symbology can be assigned ByLevel, ByCell, and forced. These three settings are analogous to the AutoCAD ByLayer, ByBlock, and forced settings.