Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

MicroStation 101

Shared Cells.
What exactly is a Shared Cell? Shared cells are a specific type of cell that can be used to make global changes quicker and easier. Or at least thats the theory. To understand shared cells you need to first be aware exactly how normal cells work. Then how do normal cells work? A cell is just a collection of graphics in a cell library (a DGN file with the .CEL extension) that can be placed as a single unit in any other file. When the cell is placed, a cell definition is stored in the DGN file - every single time. When you wish to place another instance of that cell, you need to have the correct cell library attached. (Check out Cells 101) And how do shared cells work? In comparison a shared cells definition is stored only once, the first time the cell is placed. Then every further instance of that cell is a reference of the original in the DGN file. Because the cell definition is not stored each further time the cell is placed the file size is reduced. You do not need to attach the cell library to place further instances of the cell, just make sure the tick is in Use Shared Cells at the top of the dialog box. So how do you create a shared cell? The first time a cell is placed in the DGN file, the cell library in which it is stored must be attached. In the Place Cell dialogue, tick the Use shared cells box. Any cells placed will now be shared cells, not normal cells. For a normal cell the Where column in the cell dialog will say Lbry. When Use Shared Cells is not ticked you see only Lbry files. When Used Shared Cells is ticked (an you have place one in your file) you see both Lbry (where a shared cell has not been created) and Shrd files (where the shared cell has been created). The example below shows the 3PileCap and the A1-Title cells are normal Lbry cells. GridRef is a Shrd cell. If we turned the Use Shared Cells tick off then GridRef cell will swap to the normal Lbry cell.

How do you edit a shared cell? Open the Cell library dialog box, attaching the cell library that contains the original Lbry cell. Take the tick off Use Shared Cells. Now you can only see normal cells. Edit the original cell as you usually would (right click to Open for Editing). Then use the Replace Cells tool to GLOBALY update all the shared cells in your file. You cannot update a single instance of a shared cell - they are all updated.

You must do the Replace Cells Globally step before you turn the Use Shared Cells tick back on (or else your normal cell will be updated but your shared cells will not be). How do you edit a shared cell if I cant find the original library? If you dont have the original cell then its still possible to edit the shared cells in your file. But what we have to do is use a keyin to export the shared cells in your file into a new cell library. Use the Keyin: EXPORT CELLS SHARED xxx.cel where xxx is the cell library name (the new cell library will be created in C:\Program Files\Bentley\Program\MicroStation), or where xxx is the complete path e.g. c:\myDgns\NewCellLibrary.cel. The one thing to remember when working with shared cells is that the definition cannot be deleted if any instances of that cell still exist in your design file. Once you have deleted all the shared cells in your DGN (or turned them into normal cells), you can then delete the Shrd file from the Cell dialog. How do I turn a shared cell a normal cell? If shared cells are causing you problems, you can drop them. You have the option of dropping shared cells to normal cells in the Drop Element tool settings.

Handy if you really cant manage a DGN file with shared cells. But be aware of your fellow users - they may have placed shared cells for a reason, and theres nothing more annoying than someone dropping elements (shared cells, graphic groups, solids, dimensions even) because they dont know how to manipulate them properly. I have a level that I cant delete. When I use the keyin: Level Usage <levelname> the message centre tells me that the level is used in a shared cell definition. How can I delete it? Symptoms: Level is bold in Level Manager. Used column in Level Manager is not checked. Element column in Level Manager does not list a value. How to delete the level: If level usage reports that it is used in a cell definition(s), then the file probably contains shared cell definitions that contain elements that use the level but none of the cells are placed actively in the file. If the shared cell definitions are not needed, they can be deleted. Use the Key-in: DELETE SCDEFS <shared cell name>|ANONYMOUS|ALL Shared cell name - will only delete the unused definition of the specified name. ANONYMOUS - will delete all the unused definitions that do not have a name.

ALL - will delete all unused definitions.

Check the message center to see if any shared cells were deleted. If the shared cell(s) was deleted the level usage for this level should not report that it is not being used. Level Manager should also report that the level is no longer bold. The level should now be able to be deleted. Why share? Bentleys advice is always to use shared cells. Ours is not to unless you are very comfortable with how they work. Why? Check out the Help file: Reasons to use shared cells The use of shared cells is recommended for these reasons: Shared cells are faster to place and manipulate than unshared cells. The first time a cell is placed in the DGN file, the cell library in which it is stored must be attached. If the cell is placed as a shared cell, it is not necessary to have the cell library attached to place additional instances of that cell. Faster to place? We are not convinced. If you use MS_CELLLIST (checkout Cells 201) you never need to worry about looking for a cell library. All instances of a shared cell in the DGN file are replaced when any instance of that shared cell is replaced. Yes, thats true but using Replace Cells with Mode set to Global will do exactly the same to normal cells. You also need to be aware that the Use Fence setting has no affect on shared cells because you can only update all the shared cells not just a selection of them.

Shared cells can be associated with points on other elements, if Association Lock (Settings > Locks > Association) is on. For example, if a shared door cell is placed in a wall and associated with that wall, the door will automatically move if the wall is moved. Normal cells can be associated too. Shared cells usually reduce DGN file size, thereby improving performance. Yes, well give Bentley that one. Shared cells will reduce dgn file size, but this is only noticeable with very large numbers of very large cells. When the bottleneck for design file speed is generally the network performance, you will be very hard pushed to notice any performance improvements. Is this a reason to use shared cells? I guess it could be, but not on its own.

So, shall I use shared cells or not? To sum it up, shared cells can be useful if you know how to use them properly. They will give performance improvements in a DGN file (negligible or not) and, if you use a lot of cells that you constantly update, they can improve your working speed. However, its not just you who needs to be comfortable with how they work and the process needed to modify them - every user who will open or edit a DGN file, or cell library, with shared cells in needs to know how they affect MicroStation. With V8 wed say almost all the support calls regarding cells are because they are not working in the expected way due to shared cells. People simply dont understand the implications of that single, innocuous Use shared cell tick. MicroStation Help Favourites link: ustnhelp233.html#F27811

Karen Fugle and Nigel Davies

You might also like