Custom Line Style Series Part 2: Storing Your Custom Line Styles

For those that are new to custom line styles, the topic can be a bit daunting. Line styles can be “2D”, support the inclusion of 3D geometry through Point components, and now we also have raster line styles. Custom line styles can be annotative, with the scale of custom line styles being based upon the active annotation scale in a model. And MicroStation also supports storing custom line styles in a variety of ways. Part 2 of this series on custom line styles will focus on the storage and delivery of custom line style definitions.

When working with custom line styles, the question often arises, “What is the best way to configure custom line styles?” There really is no single definitive answer to this question. Rather, it is a choice to be made by each organization based upon what the various methods offer. An understanding of these methods will help determine which best suits your needs and workflows, allowing you to make an informed decision on how custom line styles should be implemented within your organization.

There are essentially four ways to deliver custom line style definitions in MicroStation. These methods include:

  • Resource library
  • Design library
  • Seed file
  • AutoCAD linetype file(s)

All of these methods can be included in your configuration, at any configuration level, such as within the Organization or WorkSpace standards. It is also possible to utilize any combination of these methods if it would be of benefit to do so. Let’s review the different methods in greater detail.

 

Method 1: Resource Library

The MicroStation resource library, or RSC file, can be thought of as the more traditional method of delivering custom line style definitions. This was the method used for storing line style definitions when custom line styles were introduced in MicroStation V5, and is still widely used today. It is a binary file with a file extension of .rsc, and can only be opened using the Line Style Editor accessed from within MicroStation. The resource library is still required for creating and editing custom line style definitions.

Access to line style resource libraries is provided through the configuration variable MS_SYMBRSRC. This variable is used to point to a list of one or more resource libraries containing custom line style definitions. When custom line styles are stored in a MicroStation resource file, the configured .rsc file must always be present and active for custom line styles to be viewable in the DGN files they are used in. These resources are read dynamically each time the MicroStation application is started, automatically making available resources found within the configuration variable search path(s). If the same line style name is contained in more than one resource library, it is the last definition that is read that will be used to display that line style.

Another aspect of storing custom line style definitions in a resource library is the sizing of a custom line style when placing elements in a design. This links directly to the Working Units in the active DGN. The .rsc file is essentially unitless, based upon Master Units, with line style components based upon whatever the units are in the active model. In other words, a unit = a unit. For example, if the active DGN file when a custom line style is created uses working units based upon Meters, line style components such as Stroke Patterns and Points will be based upon Meters. If the same line style were then used in a model whose units are set to US Survey Feet, a unit still equals a unit. This means that a stroke pattern initially meant to be 5 meters in length would now be 5 feet in length. Obviously 5 meters does not equal 5 feet. To compensate for this, 2 different sets of line style resources would be required or a line style scale set to compensate for the difference in units. This problem can seem even more pronounced if a custom line style represents something measurable in the real world such as a pavement marking or a railing.

The following are true for custom line style definitions stored in a resource library (.rsc):

  • Custom line style definitions are NOT stored in the active design file.
  • Line style definitions are dynamic. The list of available custom line style definitions is read anew each time the MicroStation application is started. This ensures that the definition of a custom line style is always the most current.
  • The resource library must be present within the active configuration for any geometry that uses the custom line style definitions to be viewed correctly. If the resource library is NOT present, custom line styles will appear as a Line Style 0.
  • When providing design files to others, the custom line style resource library must also be provided so that it can be included within the recipient’s configuration.
  • Editing can be performed directly within the resource library (.rsc).
  • When archiving project data, it may be desirable to store a copy of any resource libraries containing custom line style definitions within the archive.

 

Method 2: Design Library

A configured design library can also be used to provide custom line styles. Line style definitions are created and maintained using a resource library, but may be imported into a DGNLib that is then used for distributing line style definitions. A DGNlib that contains custom line styles is configured as is any other DGNLib, using configuration variables such as MS_DGNLIBLIST or _USTN_SYSTEMDGNLIBLIST. Using a DGNLib to deliver custom line styles offers advantages not provided by a resource library.

The following are true for custom line style definitions stored in a design library (.DGNLib):

  • Custom line style definitions, when used, are copied into the active file making that line style definition a part of the DGN. This allows the line style to be “portable”, traveling with the file.
  • Line style definitions are static. A line style definition, when used, is stored in the active design file with this local version being the one that is always used within the DGN. New custom line styles added to a configured design library will appear within the list of available line styles, but if changes are made to the original definition (DGNLib) of a line style that has been used in the active DGN, these changes will not automatically propagate to the DGN file.
  • If the DGNLib containing the original line style definitions is not available, DGN files that have used custom line styles from that library will still appear correctly when files are opened.
  • When providing design files to others, the custom line style resources do not need to be provided.
  • To edit a custom line style that is stored in a DGNLib, a resource library (.rsc) is still required. The line style can be exported from the DGN to a RSC when needed, edits made, and then re-imported into the DGNLib.
  • When archiving a project, custom line styles that have been used in that project are automatically archived because they are stored within the DGN’s they were used in.
  • Once a custom line style has been used in a design, that line style definition has been written the DGN. Even if all elements that used the line style definition are removed from the file, the line style will be present. To remove the definition, the Compress Option “Unused Line Styles” must be enabled and the file compressed. Only UNUSED line styles may be compressed from a file.
  • A line style will typically be used in many different DGN files, with the possibility of the units varying between these files. Line styles stored in a DGNLib will appear sized correctly, related to the active units in the DGN. Line styles stored in an RSC file may not.

As an example, depending upon the file, this could range from 4 feet to 4 inches, 4 meters, or 4 millimeters. Custom line styles would be scaled accordingly. To make the scaling based on real world units, the line styles can be imported into a DGN (or a DGNLib). When deployed in this manner, a line style will appear the correct size, regardless of the units of the file the line style is used in.

 

Method 3: Seed File

And while it is probably not considered common practice, custom line styles can also be stored within a seed file. The use of a seed file is similar to that of the DGNLib, with one significant difference. The seed file does not provide the ability to see a “live” list of the current custom line styles. Line styles included in a seed file are in essence a static copy of the custom line styles included in the seed file at the time a file is created.

When creating a new design file, the new DGN is essentially a snapshot of the settings and information contained in the seed file at the time the DGN is created. This would include any custom line style definitions stored in the seed file. If changes are made to the seed file (such as new line styles being added or existing line styles modified), existing DGN’s that were created from that seed file are not aware of the change. This makes this method of delivering custom line styles more static than using a RSC file or a DGNLib. Existing DGN’s may be updated by importing any new or modified line style definitions, but the process is entirely manual.

 

Method 4: AutoCAD Linetype File(s)

MicroStation also allows a set of AutoCAD linetypes to be configured and distributed for use. The configuration variable MS_LINFILELIST is used to point to a directory containing (AutoCAD) LIN linetype files. When a line style definition is used that is contained in folder located using this variable, the line style definition will be copied into the active DGN file. With the line style being stored within the active file, it offers the same benefits as the Design Library and Seed File methods.

 

As can be seen, there are benefits that present themselves any of the methods of configuring custom line styles. The choice really is yours based upon what would benefit your organization the most.

 For more information on design libraries (DGNLib’s) or custom line styles, visit the courses on the Bentley LEARNserver:

 

Happy LEARNing!