You are currently reviewing an older revision of this page.
Original Article Date: Feb 13, 2001
If you've dabbled with creating your own Custom Line Styles and found it to be a frustrating experience, then read along and in no time at all you'll reap the rewards of increased productivity and reduced file sizes!
Authors note: This article also appears in the December 2000 issue of the MicroStation Manager Magazine and is Part 2 of 2. Go to Give your files some style with Custom Line Styles - Part 1Last month I introduced Custom Line Styles and chatted a bit about the benefits of incorporating them into your designs. We also took a look at how you can alter the appearance of a Custom Line Style by adjusting various settings upon placement or after the fact by using special tools. This month I'll walk you through the steps to create a simple Custom Line Style of a geological fault line. If you've dabbled with creating your own Custom Line Styles and found it to be a frustrating experience, then read along and in no time at all you'll reap the rewards of increased productivity and reduced file sizes!Let's start with the a quick review of the basics and get some theory out of the way:In order for MicroStation to know how to represent a Custom Line Style on your screen, it reads the definition of the selected style from an external file called a Line Style Resource File, or simply a Line Style Library. This resource file has the extension of .rsc and can be found in .../wsmod/default/symb/ for MicroStation SE and .../workspace/system/symb/ for MicroStation J.MicroStation searches for and automatically opens the line style libraries as specified by the MS_SYMBRSRC configuration variable setting. If MS_SYMBRSRC is not defined or the specified file(s) are not found, MicroStation automatically opens the default lstyle.rsc in the directory specified in the MS_RSRCPATH setting. The files are opened in the order they appear in the directory list as seen in Workspace > Configuration > Symbology with the last one having the highest priority.The parts of a Custom Line Style: A Custom Line Style definition consists of the following parts:
Our Custom Line Style: The line style we're going to create represents a geological fault line and is typical of what you might find on exploration maps. Often these lines are built using Linear Patterns which results in large design files and doesn't allow for quick and easy edits.
Six Easy Steps:To successfully create your own Custom Line Styles, just follow these six easy steps:
1. Open the Line Style Editor: From the Primary Tool Bar, select Edit from the Line Style pick list or key in mdl load lstyle;linestyle edit. The Line Style Editor is the dialog which will allow you to create, modify and save your Custom Line Styles.
2. Create a new line style library: Before proceeding, we need to either open an existing resource file or create a new one. Both of these functions can be accessed via the File menu from the Line Style Editor. When a new line style library is created it will contain the eight “delivered” internal line styles.3. Create a new line style name: From the menu bar of the Line Style Editor, select Edit > Create > Name. MicroStation will automatically insert a new Unnamed line style. Since this is the name which appears when you choose your active line style, change the word Unnamed to something more logical or descriptive. In this example, let’s call the new line Fault.
4. Create the stroke pattern and point components:
We now need to define the dashes and gaps of our new line style. The stroke pattern is going to be 3 dashes, and by clicking on the Add button three times it will insert three new segments. Each segment shown is a button that needs to be clicked in order to define its characteristics. Click on the first segment, adjust it’s settings to read: Fixed Length of 1.0 master unit and the Stroke Type should be set to Dash. All other settings will remain the default values. The middle and end segments are the same except for the length. Click on the middle segment and adjust it’s length to 0.5 master units, and finally, click on the last segment and set it’s length to 1.0 units.
5. Create the Compound Definition: We now have to create the compound definition for our line style. This is simply a combination of existing stroke and point components, that when put together, creates the line style. Select Edit > Create > Compound and change the name accordingly. MicroStation will then open the appropriate dialog which will allow us to insert the newly created Fault Stroke and Fault Point components.
6. Link the compound to the name: Almost done...we now need to link the name (Fault) to the compound definition created in Step 5. Ensure that the name Fault is highlighted on the left side of the dialog and that the Fault Compound is highlighted on the right side. Then select Edit > Link and MicroStation will add a >> in front of the line styles name. This indicates that our name has been linked to the style the Fault Compound. Finally, to save your work, select File > Save.
With a little imagination and creativity, you can incorporate custom line styles just about anywhere! Just think of all the benefits:
Have fun! Oh, and here are some useful key-ins:
What it Does
mdl load lstyle;linestyle settings
Loads the Line Styles dialog box for selecting the active custom line style.
mdl load lstyle;linestyle edit
Loads the Line Style Editor for creating custom line styles.
Place symbol name
Places a point symbol from the resource file into your active design file.
Delete symbol name
Deletes a point symbol from the resource file. It must not be attached to any point components or will result in an error message.
Sets the line style name as the active line style for element placement.
Activates the Change Element to Active Line Style tool.
Change linestyle scale value
Allows you to change the line style scale for an element. Can also be used with a fence or a selection set.
mdl load calc;calc tcb->lineStyle.scale=x
To change the active custom line style scale by using a keyin. (Posted to CCM by Jim Weisgram)
mdl load calc;calc tcb->lineStyle.modifiers=1|tcb->lineStyle.modifiers
Turns ON the scale setting if turned OFF in the custom line style settings dialog. (Posted to CCM by Jim Weisgram)
For more information:
AskInga Article #49