0% found this document useful (0 votes)
85 views29 pages

Configuring Microstation Workspaces: P.H. Rhodes, Inc

Uploaded by

Cintia Rios
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views29 pages

Configuring Microstation Workspaces: P.H. Rhodes, Inc

Uploaded by

Cintia Rios
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Configuring MicroStation Workspaces

Bentley 2005 BE Conference Workshop MTN0184

P.H. Rhodes, Inc.


Training, Consulting and Support Services

Copyright
Copyright 2004 by P.H. Rhodes, Inc. All rights reserved. Produced in the United States of America. This document or any part thereof may not be reproduced, stored or transmitted in any media, in any form, including but not limited to electronic, photocopying, mechanical copying, electrostatic copying, recording or any other means without the express written permission of P.H. Rhodes, Inc. P.H. Rhodes believes this information is accurate as of its publication date, however no warranty or fitness is implied.

Trademarks
MicroStation, MicroStation/J, AccuDraw, SmartLine and the B Bentley logo are registered trademarks of Bentley Systems, Inc. AutoCAD is a registered trademark of AutoDesk, Inc. Windows, Windows Explorer, My Computer and Notepad are registered trademarks of Microsoft Corporation.

About the Presenter


Patrice Rhodes is an independent consultant specializing in on-site customized software training, utilizing client documents and procedures. Patrice has written and implemented extensive customized training programs for a variety of clients including government agencies, utility companies, manufacturing firms and engineering consultants. She also writes and conducts seminars on training and course development and provides on-site consulting and support services for her clients. Patrice Rhodes has been providing successful training and support programs on MicroStation and other related software products since 1988.

P.H. Rhodes, Inc.


Training, Consulting and Support Services
E8185 Hogsback Road Reedsburg, WI 53959 (608) 524-0831 [email protected]

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Workspaces and Workspace Components

A workspace is a custom working environment in MicroStation. When you run MicroStation, you enter a workspace. The following components make up a workspace: User Project Interface - The user configuration file and the user preference file - The (optional) project configuration file (and project folders) - The user interface folder (and modification files)

The user configuration file and the project configuration file both contain configuration variables, or settings that control various aspects of how MicroStation operates. In addition to containing configuration variables, the user configuration file can also specify or point to your remaining workspace components for running MicroStation. It specifies which project configuration file (if any) will be included as part of your workspace. It also specifies which user preference file and which user interface will be included. Although all of these components make up your workspace, the workspace name is always that of the user configuration file and the user configuration file often points to the other components. Each of the workspace components holds information that customizes your working environment.

The User Configuration (UCF) File


The user configuration or UCF file holds configuration variables that are unique to a single user and are not intended to be shared with a group.

The User Preference (UPF) File


The user preference or UPF file holds user preference settings for a single user. User preference settings include all those settings found in the Preferences dialog box in MicroStation, plus other user specific settings such as file history and locations of tools and settings boxes.

The Project Configuration (PCF) File and Folders


Project folders hold standard resource files to be shared by all users working together on a particular project. The project configuration or PCF file holds configuration variables that point to the standards in the project folders.

The User Interface Folder and Modification Files


The user interface is a directory of user interface modification files that determine which custom tools and menus will be available in MicroStation. The name of the directory determines the name of the user interface, and the modification files determine which tools and menus are available in the user interface of that name. The user interface can be shared by a group of users who need similar types of tools and menus for their work. ______________________________________________________________________

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Creating a Workspace

To create a workspace, you must create a user configuration file. The user configuration file can contain pointers to the other workspace components along with configuration variable settings specific to the individual user. To create a workspace 1. Select New from the User menu at the bottom of the MicroStation Manager. The Create User Configuration File dialog box opens. 2. Assign a name for the new UCF file. The Create User Configuration File dialog box opens. 3. Enter a description for the new UCF file. 4. If you wish to include an existing project as part of your workspace, click the upper Select button and select a project from the Select Project Configuration File dialog box. 5. If you wish to include an existing user interface (other than the Default interface) as part of your workspace, click the lower Select button and select a user interface from the User Interface dialog box. The name of the newly created workspace appears in the User menu at the bottom of the MicroStation Manager. The newly created UCF file is located in the \Bentley\Workspace\users\ directory. By default, when you create a new workspace, MicroStation creates a user preference UPF file for your workspace and includes it as part of the workspace. The newly created UPF file has the same name as the workspace (but with the UPF extension) and is located in the \Bentley\Home\prefs\ directory. v You can also create a user configuration file through Windows Explorer by copying an existing UCF file in the \Bentley\Workspace\users\ directory. v You can also create a user preference file through Windows Explorer by copying an existing UPF file in the \Bentley\Home\prefs\ directory. With your workspace selected in the MicroStation Manager, the Project and Interface menus display the project and interface components to include with your workspace. You can also create new components from those menus.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. Open the MicroStation Manager window.

*************************************************************

2. From the User menu in the Workspace area at the bottom of the MicroStation Manager, select New to create a new workspace. In the Create User Configuration File dialog box, assign the new workspace the name be_user and the description BE_2005_User.

Your new workspace name should appear in the User menu at the bottom of the MicroStation Manager. Do not select a project or a user interface. Leave the MicroStation Manager open.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
3. Open a Windows Explorer or My Computer window and locate the UCF file and the UPF file you just created by creating the new workspace. Do not open the files. \Bentley\Workspace\Users\be_user.ucf \Bentley\Home\prefs\be_user.upf 4. Minimize the Explorer window for now.

*************************************************************

*************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Creating a Project

A project is an optional component that may be created or selected to include as part of a workspace or workspaces. A project is designed to include standards shared by a group of users working together on that project. When you create a project, you create a project folder that contains subdirectories for storing various standards, and a project configuration file that contains configuration variable settings to point MicroStation to those standards. To create a project 1. Select New from the Project menu at the bottom of the MicroStation Manager. The Create New Project dialog box opens. 2. Assign a name for the new project. 3. Enter a description for the new project. The name of the newly created project appears in the Project menu at the bottom of the MicroStation Manager. The new PCF file and a new project folder of the same name are created in the \Bentley\Workspace\Projects\ directory. Under the project folder, you will find a set of default project subdirectories for organizing your project standards. v You can also create a project configuration file through Windows Explorer by copying an existing PCF file (or the project.template file) in the \Bentley\Workspace\Projects\ directory. v You can also create a project directory through Windows Explorer by copying an existing project directory in the \Bentley\Workspace\Projects\ directory. You can select any existing project as part of your workspace. You may also choose not to include a project as part of your workspace. Your project selection appears in the Project menu at the bottom of the MicroStation Manager. ______________________________________________________________________

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. Open the MicroStation Manager window.

*************************************************************

2. From the Project menu at the bottom of the MicroStation Manager, select New to create a new project. In the Create New Project dialog box, assign the new project the name be_project and the description BE_2005_Project.

Your new project name should appear in the Project menu at the bottom of the MicroStation Manager. Leave the MicroStation Manager open.

3. Open a Windows Explorer or My Computer window and locate the PCF file and project folder you just created by creating the new project. \Bentley\Workspace\Projects\be_project.pcf \Bentley\Workspace\Projects\be_project\ 4. Minimize the Explorer window for now.

*************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Creating a User Interface

The user interface determines which tools and menus will be available as part of your workspace. You may choose to include the delivered default user interface, or you can create or select a custom interface. When you create an interface, you create an interface directory where modifications to the default interface are stored as modification files. To create an interface 1. Select New from the Interface menu at the bottom of the MicroStation Manager. The Create User Interface dialog box opens. 2. Assign a name for the new interface. 3. Enter a description for the new interface. The name of the newly created interface appears in the Interface menu at the bottom of the MicroStation Manager. A new interface folder of the same name is created in the \Bentley\Workspace\Interfaces\MicroStation\ directory. As you customize the interface within MicroStation, interface modification files will automatically be added and changed in the interface folder.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. Open the MicroStation Manager window.

10

*************************************************************

2. From the Interface menu at the bottom of the MicroStation Manager, select New to create a new interface. In the Create User Interface dialog box, assign the new interface the name be_interface and the description BE_2005_Interface.

Your new interface name should appear in the Interface menu at the bottom of the MicroStation Manager. Leave the MicroStation Manager open.

3. Open a Windows Explorer or My Computer window and locate the interface folder you just created. \Bentley\Workspace\Interfaces\MicroStation\be_interface\ 4. Minimize the Explorer window for now. 5. From the MicroStation Manager, open C:\class_be_config\be.dgn. 6. Select Workspace menu > About Workspace from the Main menu bar. Read the workspace information in the top half of the dialog box that opens.

*************************************************************
Copyright 2004 P.H. Rhodes, Inc. All rights reserved.

Configuring Workspaces
Selecting Workspace Components
There are several ways to select workspace components when you run MicroStation. 1. Select workspace options in the MicroStation Manager 2. Key configuration variables into configuration files Add or edit the following key-in in \Bentley\Home\prefs\dfltuser.cfg _USTN_USERNAME = <your workspace name> (When you select a workspace from the User menu in the MicroStation Manager, you automatically set this variable.)

11

Add or edit the following key-in in \Bentley\Workspace\Users\<your workspace name>.ucf _USTN_PROJECTNAME = <your project name> (When you select a project from the Project menu in the MicroStation Manager, you automatically set this variable.) Add or edit the following key-in in \Bentley\Workspace\Users\<your workspace name>.ucf Set _USTN_USERINTNAME = <your interface name> (When you select an interface from the Interface menu in the MicroStation Manager, you automatically set this variable.) 3. Add command line key-ins to desktop icons Add a space and -wu<your workspace name> to the command line that runs MicroStation to choose the user UCF file or workspace to open. Add a space and -wp<your project name> to the command line that runs MicroStation to choose the project PCF file to use. Add a space and -wi<your interface name> to the command line that runs MicroStation to choose the user interface to use. The command line key-in can be edited in the Properties dialog box for the MicroStation desktop icon. Command line key-ins have the highest priority and will override any workspace component choices made by other methods.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. In Windows Explorer, locate \Bentley\Program\MicroStation\ustation.exe. This is the executable file that runs MicroStation. 2. Right-click on the file and select Create Shortcut to create a shortcut to the file. 3. Right-click on the shortcut file and select Copy, then right-click on your desktop and select Paste to copy the shortcut to your desktop.

12

*************************************************************

4. Right-click on the new desktop icon and select Rename. Rename the icon as BE Config Workspace.

5. Right-click on the icon again and select Properties. On the Shortcut tab, add a space and the following text to the end of the Target field and save your changes: -wube_user wpbe_project wibe_interface

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces

13

*************************************************************
6. Double-click the desktop icon to start MicroStation. Make sure all of your chosen workspace components are selected in the MicroStation Manager.

*************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Configuration Variables
Configuration variables are settings that give instructions to MicroStation. Each configuration variable appears as a line of text and can be found in one (or more) of a collection of text files called configuration files that are read when you start MicroStation. MSDIR = C:/Program Files/Bentley/Program/MicroStation/

14

Configuration Files and Levels


There are many configuration files that contain configuration variables. When you start MicroStation, they are read in a particular order based on their type and location. The configuration variables are then given levels of priority as follows: System - Level 0 - Set by MicroStation - Lowest level - can be overridden by variables set at any other level - Typically set by third party applications - Can override system level variables - Can be overridden by site, project and user level variables - Typically set by system or site manager - Intended for variables unique to a site or organization - Can override system and application level variables - Can be overridden by project and user level variables - Typically set by project manager - Intended for variables unique to a project or client - Can override system, application and site level variables - Can be overridden by user level variables - Typically set by user - Intended for variables unique to a single user - Highest level - can override variables set at all other levels

Application - Level 1

Site - Level 2

Project - Level 3

User - Level 4

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
When you start MicroStation...

15

The following is a typical scenario that occurs when you run MicroStation, assuming you have loaded the current version of MicroStation in the default location on the C:\ drive of a computer. MicroStation first reads mslocal.cfg. C:\Program Files\Bentley\Program\MicroStation\config\mslocal.cfg Mslocal.cfg sets a couple of system level configuration variables and then directs MicroStation to include (read) msconfig.cfg. C:\Program Files\Bentley\Bentley\Program\MicroStation\config\msconfig.cfg Msconfig.cfg sets many system level configuration variables and also directs the location and order in which to include other configuration files. MicroStation is first directed to include any .cfg files in its system directory and read their configuration variables as system level variables. C:\Program Files\Bentley\Program\MicroStation\config\system\msclasses.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\msdirs.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\msfiles.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\mslocale.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\mstrans.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\msweb.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\security.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\spellchecker.cfg C:\Program Files\Bentley\Program\MicroStation\config\system\workmode.cfg MicroStation is then directed to include any .cfg files in its application directory and read their configuration variables as application level variables. C:\Program Files\Bentley\Program\MicroStation\config\appl\modeler.cfg C:\Program Files\Bentley\Program\MicroStation\config\appl\zmptools.cfg MicroStation is then directed to include any .cfg files in its site directory and read their configuration variables as site level variables. C:\Program Files\Bentley\Workspace\standards\standards.cfg

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces

16

MicroStation is then directed to identify which workspace is active and therefore which user configuration .ucf file to read. If one is not designated in the command line or in an operating system environment variable, MicroStation then looks for a dfltuser.cfg file in its home directory. C:\Program Files\Bentley\Home\prefs\dfltuser.cfg If a dfltuser.cfg file is not found, then MicroStation chooses untitled.ucf as the active user configuration file. MicroStation reads the active .ucf file in its user directory and reads any configuration variables in it as user level variables. C:\Program Files\Bentley\Workspace\users\untitled.ucf MicroStation is then directed to include the project configuration file if one is designated. If one is not designated in the command line or in an operating system environment variable, MicroStation checks if a project file is designated by configuration variable, usually in the user configuration file. MicroStation then includes the correct project configuration .pcf file from its project directory and reads any configuration variables in it as project level variables. C:\Program Files\Bentley\Workspace\projects\examples\untitled.pcf MicroStation is then directed to locate the active user interface. If one is not designated in the command line or in an operating system environment variable, MicroStation checks if a user interface is designated by configuration variable, usually in the .ucf file. MicroStation then points to the correct user interface modification file(s) from its user interface directory as part of the active workspace. C:\Program Files\Bentley\Workspace\Interfaces\MicroStation\default\ MicroStation also defines a user interface path where it searches for user interface modification files, including the default user interface, before searching the active interface that is part of the active workspace. After all configuration files are read and all variables are stored in memory, MicroStation will determine the value of each variable by looking for its definition at the highest level where it was set.

_____________________________________________________________

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Editing Configuration Variables

17

All configuration variables can be edited in the configuration (.cfg, .pcf and .ucf ) text files in which they reside using any text editor. Any changes you make to configuration variables will take effect the next time you run MicroStation (when MicroStation reads the configuration files again). Lines starting with a # are commented out and therefore not read by MicroStation. The Configuration dialog box in MicroStation can be useful for viewing configuration variables and their definitions. It lists the current values of configuration variables and the level at which they were assigned when you ran MicroStation. The User Configuration dialog box can be opened by selecting Configuration from the Workspace menu in MicroStation. The Configuration dialog box also allows you to create, edit or delete configuration variables. Any changes you make are assigned at the user level and therefore written to your user configuration .ucf file. If you choose to edit variables from the dialog box, be aware that you may write over variable definitions and comments that were typed into your .ucf file through a text editor.

The Configuration Dialog Box

v TIP: To display all configuration variables beginning with _USTN_ in the Configuration dialog box, add the following configuration variable definition to one of your configuration files: _USTN_DISPLAYALLCFGVARS = 1

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. Exit MicroStation. 2. In Windows Explorer, locate the file \Bentley\Workspace\Users\be_user.ucf. 3. Open be_user.ucf in Notepad. 4. Add the following line to the configuration file: _USTN_DISPLAYALLCFGVARS = 1 5. Save your changes and close Notepad. 6. Start MicroStation and open be.dgn.

18

*************************************************************

7. Select Workspace menu > Configuration to open the Configuration dialog box. With All (Alphabetical) selected in the Category list, scroll down the list at the top center area of the dialog box to see the variables listed. Look for configuration variables beginning with _USTN_ including the _USTN_DISPLAYALLCFGVARS variable you just set. Close the Configuration dialog box.

*************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Configuration Variable Types
There are five general types of configuration variables:

19

Path
Designates a path where MicroStation will look for files.
MS_RFDIR = C:/Program Files/Bentley/Workspace/standards/dgn/

Directory
Designates a location where MicroStation will send files.
MS_PLTFILES = C:/Program Files/Bentley/Workspace/projects/untitled/out/

Filename
Specifies file(s) MicroStation will use.
MS_ACCUDRAWKEYS = C:/Program Files/Bentley/Workspace/system/data/shortcut.txt

Keyword
Specifies a key word or name for a setting used by MicroStation.
MS_SPELLINGLANGUAGE = AmericanEnglish

Boolean
Toggles a setting used by MicroStation (usually on or off).
MS_WORKSPACEOPTS = 0

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Configuration Variable File Syntax
Configuration Variables

20

A configuration variable definition has three parts, a variable name, an operator and an assigned value.
MS_FKEYMENU = C:/ProgramFiles/Bentley/Workspace/interfaces/fkeys/funkey.mnu

VARIABLE NAME OPERATOR ASSIGNED VALUE

The variable name is the name of the configuration variable being defined. The operator controls how the value in the definition is assigned.

The following rules apply when defining configuration variables:


Names must be minimum of two characters with no maximum. Names may contain only alphanumeric characters (A_Z and 0-9) and underscores (_). Configuration variables are not case sensitive. Spaces or tabs before or after the variable name are ignored. By default, variable names beginning with _ do not appear in the Configuration dialog box in MicroStation. Forward slashes (/) should be used between directory names. Path and directory variables must end with a forward slash. Multiple paths may be connected with a semicolon (;).

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Variable References
After a configuration variable is defined, its name may be used as a variable reference within another configuration variable definition. If the variable MS_DATA is already defined ...
MS_DATA = C:/Program Files/Bentley/Workspace/system/data/

21

Then the following variable containing the variable reference $(MS_DATA)


MS_ACCUDRAWKEYS : $(MS_DATA)shortcut.txt

Expands to
MS_ACCUDRAWKEYS : C:/Program Files/Bentley/Workspace/system/data/shortcut.txt

Operator Values
The following operators may be used: = : < > + Assign value to variable Assign value to variable only if variable not already defined Prepend variable definition (adds value and semicolon to beginning of definition) Append variable definition (adds semicolon and value to end of definition) Add to variable definition (adds space and value to end of a string)

In the system level configuration file msfiles.cfg ...


MS_SYMBRSRC : $(_USTN_SYSTEMROOT)symb/*.rsc

In the site level configuration file standards.cfg ...


MS_SYMBRSRC > $(_USTN_SITE)symb/*.rsc

In the project level configuration file untitled.pcf ...


MS_SYMBRSRC > $(_USTN_PROJECTDATA)symb/*.rsc

Therefore, the final value of MS_SYMBRSC is ...


MS_SYMBRSRC = $(_USTN_SYSTEMROOT)symb/*.rsc;$(_USTN_SITE)symb/*.rsc;$(_USTN_PROJECTDATA)symb/*.rsc

When multiple font resource files are read, and same font number is used for a different font in each resource file, the last resource file to be read by MicroStation is given priority. In this configuration, the font resource files in the project area will be read last. Within that folder, the font resource files will be read in alphabetical order.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. In MicroStation, open testsymb.dgn. Note that the custom line style does not display.

22

*************************************************************

2. Exit MicroStation. 3. In Notepad, open \Bentley\Workspace\Projects\be_project.pcf. Note that the MS_SYMBRSRC configuration variable is already set to look for any RSC files in the symb folder under your project. The MS_SYMBRSRC variable determines which fonts and custom line styles are available and display in your drawings. Close Notepad. 4. In Windows Explorer, copy the file be_linestyle.rsc from C:\class_be_config\ to the \Bentley\Workspace\Projects\be_project\symb\ folder. 5. Start MicroStation and open testsymb.dgn again. The custom line style should display properly. (Hee! Hee!)

*************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. Exit MicroStation. 2. In Windows Explorer, copy the files original.cel and revised.cel from C:\class_be_config\ to the \Bentley\Workspace\Projects\be_project\cell\ folder. Both libraries contain a cell named flagman.

23

*************************************************************

3. In Notepad, open \Bentley\Workspace\Projects\be_project.pcf. Note that the MS_CELLLIST configuration variable is already set to look for any CEL files in the cell folder under your project. The MS_CELLLIST variable determines which cell libraries are searched for a cell not found in the current library. If you try to key in a cell name to place a cell that is not in the attached cell library, MicroStation will search that list of cell libraries for the cell definition. Unless a configuration variable specifies otherwise, the cell libraries are read in alphabetical order. If the same cell name exists in more than one of the cell libraries, then MicroStation uses the first cell it encounters with the correct name. 4. Start MicroStation and open be.dgn. Do not attach any cell libraries! 5. Select the place cell tool and key in the name flagman into the Active Cell field in your tool settings window. Place the cell in your view. With a cell named flagman in both cell libraries, the system found and placed the flagman cell it found first, in the original.cel library.

6. Exit MicroStation.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
7. In Notepad, open \Bentley\Workspace\Projects\be_project.pcf. Edit the MS_CELLLIST configuration variable to read as follows: MS_CELLLIST < $(_USTN_PROJECTDATA)cell/original.cel MS_CELLLIST < $(_USTN_PROJECTDATA)cell/revised.cel 8. This will cause MicroStation to read the revised.cel library before it reads the original.cel library and therefore give priority to the cells in revised.cel. Save your changes and close Notepad. 9. Start MicroStation and open be.dgn.

24

*************************************************************

10. Select the place cell tool again and key in the name flagman into the Active Cell field in your tool settings window. Place the cell in your view. This time, the system should find the revised flagman cell. Place a few of the new and improved flagmen in your file!

*************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
Preprocessor Directives
Preprocessor directives are lines of text in configuration files that control how MicroStation processes configuration files. .......................................................................................................................................... %if <EXPRESSION A> %elif <EXPRESSION B> - If <EXPRESSION A> is true, then execute the following lines of instructions. - Or else if <EXPRESSION B> is true, then execute the following lines of instructions.

25

Boolean operators to use in <EXPRESSIONS>: defined ( <VARIABLENAME> ) exists ( <FILE or FILES> ) || && ! () %else %endif - <VARIABLENAME> is defined - <FILE or FILES> exist - Or - And - Not - grouping

- (If none of the above statements is true) Execute the following lines of instructions. - End of %if statement (Each %if must be paired with a %endif)

.......................................................................................................................................... %level <#> %undef <VARIABLENAME> %include ( <FILE or FILES> ) level <#> %error <MESSAGE> %lock <VARIABLENAME> - Change priority level to which configuration variables are assigned - Deletes previous <VARIABLENAME> definition - Include <FILE OR FILES> - Include <FILE OR FILES> at priority level <#> - Stop MicroStation startup process and display error <MESSAGE> in text window - Lock <VARIABLENAME> to current value

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE
1. Exit MicroStation.

26

*************************************************************

2. In Notepad, open \Bentley\Workspace\Projects\be_project.pcf. Note that the MS_SYMBRSRC configuration variable is already set to look for any RSC files in the symb folder under your project. The MS_SYMBRSRC variable determines which fonts and custom line styles are available and display in your drawings. 3. Add a new line to be_project.pcf (immediately after the line where MS_SYMBRSRC configuration variable is set) with the following text: % lock MS_SYMBRSRC 4. This will lock the variable so it cannot be changed by users. 5. Start MicroStation and open testsymb.dgn. 6. In the Configuration dialog box, click on Symbology in the Category list to locate the definition of the MS_SYMBRSRC configuration variable. Note the L displayed in the list box at the top of the dialog box. This indicates that the variable is locked. Note also that the Edit, Select and Delete buttons are all dimmed. When a variable is locked, users cannot edit or delete it, even by editing their UCF files in a text editor.

*************************************************************
Copyright 2004 P.H. Rhodes, Inc. All rights reserved.

Configuring Workspaces
Debugging Configuration Variable Files

27

Debugging configuration variable files is a process that provides a report on your current configuration when you run MicroStation. The report is saved as a text file named msdebug.txt in the \Bentley\Program\MicroStation\ directory. The report can be useful for informational and diagnostic purposes when you are working with configuration variables. You can choose how detailed you wish the report to be. To set up a debug icon for MicroStation on your Windows desktop: 1. Make a copy of the MicroStation shortcut icon on your Windows desktop. 2. Rename the new icon to include the word debug so you will not confuse it with the normal MicroStation icon. 3. In the Properties window on the Shortcut tab, add -debug=# to the end of the Target line. The number # can be 1,2,3,4 or 5, with 1 generating the shortest report and 5 the most detailed report. (If -debug is added without an option number, report type 4 is generated.) C:\Program Files\Bentley\Program\MicroStation\ustation.exe -debug=5 When you double-click the debug icon, the debug report is generated. The MicroStation/J Text Window will appear when you run a debug. To dismiss the window, click inside the window and then press <Enter>. Then use Notepad (or any text editor) to open and review the file msdebug.txt in the \Bentley\Program\MicroStation\ directory.

Obtaining a Complete List of Configuration Variables


You can obtain a complete list of MicroStation V8 2004 Edition configuration variables and descriptions in the TechNotes/FAQs area of the Bentley Select Services website under Document Number 8223.

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Configuring Workspaces
EXERCISE

28

*************************************************************

1. If time permits, create a debug icon on your desktop by copying your BE Config Workspace icon and then editing its properties.

2. Run the debug and close the resulting window. 3. Open the \Bentley\Program\MicroStation\debug.txt file and review the results.

************************************************************

Copyright 2004

P.H. Rhodes, Inc.

All rights reserved.

Thank you!
I hope you enjoyed the workshop!

Need training or help with CAD management?


I offer the very best consulting services and the finest quality training programs, customized to fit your standards. Patrice H. Rhodes P.H. Rhodes, Inc. Training, Consulting and Support Services (608) 524-0831 [email protected]
Copyright 2004 P.H. Rhodes, Inc. All rights reserved.

of

You might also like