Creating Custom Linestyles [VID]

 Version:V8, XM, V8i
 Area:Line Styles

(Can't see the YouTube video above?  Use this link to download a Windows Media version of the video.)


NOTE:  Make sure the current open file in MicroStation is a DGN, and not a DWG, or else you will find that you can't create your linestyles correctly.

MicroStation is delivered with several predefined line styles, but you can add to these as your needs dictate. The following is a step by step process to create a new line style definition. For our example we are going to create a line style that represents a gas line.

1. Begin by opening the Line Style Editor Dialog box. This is done by going to Element > Line Styles > Edit.

2. From the Line Style Editor Dialog box choose File > New and create your linestyle resource file (default is C:\Documents and Settings\All Users\Application Data\Bentley\MicroStation\WorkSpace\System\symb\*.rsc)

3. First the linestyle will need to be created. Go to Edit > Create > Name. You can then give the linestyle a name under the Styles column, and the name of the Component under the Component column.

4. Next, the component type to create for our gas line pattern is the Stroke Pattern Component. From the Line Style Editor dialog box choose Edit > Create > Stroke Pattern
This will create a new stroke pattern called new stroke component. Modify this name to Gas Stroke Component. The name is located in the lower portion of the Components section.

5. For our purposes we are going to ignore the Stroke Pattern Attributes. In the Stroke Pattern section click Add. Change the Stroke type to Dash and the Length to 2 (These are master units so this is 2'-0"). Choose Add again, but leave all the fields alone. This time changing only the Length to 2.

6. Next we will create a "G" for the point component. To do this, choose from the Line Style Editor dialog box Edit > Create > Point
Again a new component name will be added. Modify this name to Gas Point Component.
Since there is no "G" to choose, we need to create one. Use the Place Text tool and place a capital "G". The gap is 2'-0" in length, so we are going to set our text height and width to 1.

7. Use the DROP TEXT tool to convert the text character to individual elements. This is protection against the possibility that the font used when creating the linestyle may not be present when the linestyle is used in the future.
Saving a symbol is much like saving a cell. First put a fence around the symbol, define the origin, in this case the center of the "G" and click Create in the Line Style Editor box, and give the new point a name, GAS, click OK.  Click the Base Stroke Pattern... button and scroll down to Gas Stroke Component and select it. At this point we can add symbols to the origin, vertex or end points of a line, as well as to specific segments of the line. Since we want our "G" to appear in the gap between the dashes, select the graphics representing our line.

8. In the Line Style Editor Dialog box click Select. Now in the Select Point Symbol dialog box, scroll to the "G" and select it. Leave the color and weight at Element and the other fields as is.

9. Now to get the "G" and our dashed line style together we need to create a compound component. First, however choose File > Save. After saving choose Edit > Create > Compound.
Change this name to Gas Line Compound.

10. Select Insert and then in the Select Component dialog box scroll down to Gas Point Component and select it. Choose Insert again and scroll to Gas Stroke Component and select it.

11. Now link the compound to the linestyle, go to Edit > Link, notice the two >> next to the Compound.

12. When done, to make the line style available for use choose File > Save

If you re-link to another component and save the file, all currently placed lines will be modified as well as the new ones. You can build your available line styles from several different line style resource files.

See also

Other language sources

 Original Author:Dan Koval