| Product: | MicroStation | |
| Version: | V8i, CONNECT, 2023 | |
| Environment: | N\A | |
| Area: | Cells | |
| Subarea: | Replace Cell | |
Problem
How to replace cells for an entire DGN file and a set of DGN files.
Solution
With this VBA ReplaceCellByName.mvba, all cells in a DGN file can be replaced in a single step.
Using the Batch Process tool, this tool can be executed on many DGN files automatically. Optionally the new cell can be placed as an annotation cell.
Preconditions
- Variable REPLACECELLFILE must be set and define the name of the text file or XLS file.
- Format of the text file:
- Old Cell Name, New Cell Name, Scale Factor, Is Annotation Cell (1=yes, else no).
- New Cell must be a Cell in a library defined by MS_CELLLIST.
- # Comment after # sign is allowed.
- Optionally an XLS file can be used .e.g. an XLS file that is used with the MicroStation’s Remapping tool.
Format of the XLS file:
- In CellNames tab, besides 2 columns (CellName and V7OutputCellName),
3 columns are added:
- NewCellName
- Scale
- IsAnnotation (1=yes, else no)

| Original Author: |
Kees van Prooijen
| |