Is there a way I can look through all our cell libraries for a list of cells that has a shared cell instances in it. Our cell libraries are one drawing with a model for each cell. We have like 20 different cell libraries. any help here would be great.
the shared cell instances is what I'm looking for.
You could probably do something with VBA and run it through the batch process.
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2
i thought that but don't know how to have it go through all the models without me doing it one at a time. I'm new at VBA
I don't have the Connect version, but I know that the VBA Help for V8i is pretty good, with lots of example code.
At its most basic, you would write some code that would scan a single model for shared cells (ActiveModelReference.Scan with ElementScanCriteria) and create an ElementEnumerator to access them all. Then the code would go through that enumerated list one at a time (MoveNext). At that point, you could call a code loop to do whatever you want to do with that shared cell (count it, drop it to elements, etc.)
There's an entire discussion board dedicated to programming in MicroStation where they may be able to better help you.
Another possibility if not familiar with VBA
If you want to remove any shared cell instances found in the cell libraries, then you could use the Batch Convertor. To do this -
1. Optional but recommend taking a backup of your cell libraries
2. Open the Batch Convertor ( File > Tools > Batch Convertor ) if required change the Default Output Format to V8.
3. Open the V8 Save As Options from the Edit Menu and select the Filter tab. Turn off the options for 'Shared Cell Instances' 'Unused Shared Cell Definitions'
4. On the Bach Convertor dialog select a destination folder for the converted libraries and add all the Cell libraries required to be processed.
5. Process the Batch Convert job
Once processed you could compare the file sizes between the original and converted libraries to see which have changed. Then if required open the original larger file as if a dgn and use the Explorer to find the shared cells instance. ( May need to compress files to compare differences )
thanks I will try it.