Productivity Corner: Management Tools15 Jul, 2005 By: James Dyer Cadalyst
MicroStation V8's level management tools help manage the display and final output of your designs.
Cadalyst's MicroStation tips included in "Productivity Corner" are compiled by James Dyer and were tested using MicroStation V8 2004 Edition. Cadalyst welcomes MicroStation tips: E-mail them to email@example.com. By submitting a tip or code, you grant Cadalyst magazine the right to print and distribute your tip or code in print, digitally and by other means. Cadalyst magazine and the authors retain the rights to the tip or code, which are not to be downloaded or copied for commercial use.
Last month's column explored several of MicroStation V8 2004 Edition's enhancements to the level system. This month's column focuses on the Level Management tool including level libraries, groups, filters and migration considerations.
With level libraries you can generate master templates of level definitions, which are then referenced within MicroStation. As with many forms of referenced data, changes made to a referenced level library file affect you the next time you open a design file.
Level libraries are very similar to the LVL files found in previous versions of MicroStation. With MicroStation V8 you can import existing LVL files directly.
- You can attach to and detach from the active file (similar to attaching a reference file). If a level library is present, MicroStation will read and use the definition to update the version of the level as stored in the design file.
- You can import level libraries from another file (DGN, DGNLIB or CSV) to the active file.
- You can export level libraries from the active file to another file (to CSV, DGN or DGNLIB). Remember, however, when you export to a DGN or DGNLIB, you will overwrite the target file.
After defining and establishing levels and (optionally) level filters, you can export the levels to a CSV file, which you can use as a project or site level standard. Users can then either import or simply attach the CSV file to gain access to the level definitions.
The advantage is that once you generate a CSV file, you simply open the file in a spreadsheet application to make the changes. Afterward, any design file that references the modified CSV file will automatically adjust to the new settings.
Creating and Modifying a Level Library
Creating a level library is easy (figure 1). You can either create a level library file from scratch or export level definitions from an existing design file. Using the Level Manager's Export Levels utility (Levels / Export), simply specify a file name for the level library and MicroStation will handle the process. Or you can use the key-in browser by entering "dgnlib update levels."
Figure 1. An example of a level library.
You can control level libraries by connecting a spreadsheet application to a database and then using the database to drive level usage.
One important note to remember is the variable MS_UPDATE_KEEP_UNUSED_LIBRARY_LEVELS controls whether unused library levels will be kept or deleted when the "dgnlib update levels" key-in is used. If set to 1, unused library levels are kept. If not set or set to 0, the levels are deleted.
Using Level Groups as Filters
You also could use a filter to select specific levels individually, which is equivalent to a level group (figure 2).
Figure 2. An example of a level group.
When you have Filters highlighted in the tree portion of the Level Manager, left click in the Level Group column to open the Level Group dialog box. MicroStation V8 will display the available levels and allow modifications.
To remove all levels from a level group, simply select a single level in the Level Groups dialog box. Holding the Ctrl key and selecting the same level again will deselect all the levels from the level group. Then click OK.
As with reference files, level filters can be nested. Using nested filters can further reduce the available levels as they are based upon the levels available from the parent filter.
You can nest a new filter under an existing filter by right-clicking on the existing filter and selecting New from the pop-up menu. You can also move or copy an existing filter to a nested position by right-clicking the filter name and selecting Move or Copy. A dialog box appears, allowing you to select which filter to nest within.
You can also use the Active Level Filter tool from the Attributes tool bar. By default, this function is hidden -- to access it, right-click on the Attributes tool bar and select it from the list.
Using Filter Groups as Level Filters
In MicroStation V8 you can define a filter group to use as a level filter, allowing you to use existing filters to define the new filter (figures 3 and 4). A filter group can be the intersection of or the difference between existing filters, as well as the union of existing filters.
Figure 3. The Level Filter command.
Figure 4. The Level Add Filter menu.
With files containing many levels, I recommend defining filters for different disciplines such as civil, architectural, mechanical or HVAC. By adding and subtracting components of the existing level filters, you can easily define a filter group named something like "Proposed" that would show only levels that included proposed components.
A filter group can consist of as many filters as needed to produce the desired criteria. The operators are:
- | (or)
- & (and)
- - (minus)
When combining level filters, a general guideline is if the operator used to create the desired combination of levels is always "and," use a nested filter. Otherwise, filter groups are a good choice.
File Migration Considerations
When you are migrating one or more pre-MicroStation V8 design files to MicroStation V8, you can update existing level structures to take full advantage of the new level capabilities.
By default, when pre-MicroStation V8 design files are migrated to MicroStationV8, levels are named in the format level 10, where 10 is the original level number. Level is the default prefix during migration, however, you can set the configuration variable MS_V7_LEVEL_NAME_PREFIX to a specific string that will override it.
If you have established pre-MicroStation V8 level names, the V8 DGN file conversion process will honor the attached level names and use them accordingly. The level number will still be retained, but it is hidden by default.
Automatically Updating Numbers to Names
By setting the configuration variable MS_V7TOV8_CSVNAME to the name of a specially modified level library file, MicroStation V8 will automatically convert any pre-MicroStation V8 file that you upgrade with the level definitions contained therein. The keys to this type of level conversion are the Number and Name columns, which are defined in every level library CSV file.
Suppressing Unused Levels
To ensure that MicroStation V8 does not transfer any unused level definitions during the conversion process, simply set the MS_V7TOV8_DELETE_UNUSED_LEVELS variable equal to 1. This means that if you only use 10 levels to organize your design data, then the resulting (migrated) file will have only 10 levels defined.
You can also set this suppression level by level by adding an additional column, labeled Required, to the V7 to V8 level library CSV file. When this column is set to 1, MicroStation V8 will always create the level definition regardless of the design data on the respective level.
MicroStation V8's level management tools provide you with flexibility in managing the display and final output of your designs.
Until next time -- enjoy MicroStation!
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!