The following table shows the new workspace variable directives included in MicroStation/J. By using these directives, you can define your variables so they more readily rely on the definitions of other variables, including the ability to use bits and pieces of other variables to construct, or build ( ), a new configuration variable.
| If a configuration variable is set as follows: MS_EXAMPLE = D:\Bentley\Workspace\MyProject\3dcells.cel |
| This directive |
Returns this information |
Using the above example |
Will result in |
| Dev( ) |
Device |
Test = $(dev (MS_EXAMPLE)) |
Test = d: |
| Dir( ) |
Directory |
Test = $(dir (MS_EXAMPLE)) |
Test = \bentley\workspace\myproject\ |
| Devdir( ) |
Device and directory |
Test = $(devdir (MS_EXAMPLE)) |
Test = d:\bentley\workspace\myproject\ |
| Parentdir( ) |
Parent directory |
Test = $(parentdir (MS_EXAMPLE)) |
Test = \bentley\workspace\ |
| Parentdevdir( ) |
Device and parent directory |
Test = $(parentdevdir (MS_EXAMPLE)) |
Test = d:\bentley\workspace\ |
| Basename( ) |
Filename |
Test = $(basename (MS_EXAMPLE)) |
Test = 3dcells |
| Filename( ) |
Filename with extension |
Test = $(filename (MS_EXAMPLE)) |
Test = 3dcells.cel |
| Ext( ) |
File extension |
Test = $(ext (MS_EXAMPLE)) |
Test = .cel |
| Noext( ) |
Complete file specification minus extension |
Test = $(noext (MS_EXAMPLE)) |
Test = d:\bentley\workspace\myproject\3dcells |
| FirstDirPiece( ) * |
First directory in path |
Test = $(FirstDirPiece (MS_EXAMPLE)) |
Test = bentley |
| LastDirPiece( ) * |
Last directory in path |
Test = $(LastDirPiece (MS_EXAMPLE)) |
Test = myproject |
* These directives were introduced in MicroStation/J v7.1.
| If the configuration variable is set as follows: MS_CELL = d:\cell\mycells\;c:\cell\;g:\mycells\ |
| First( ) |
First path from a list of paths |
Test=$(first (MS_CELL)) |
Test=d:\cell\mycells\ |
| Concat( ) |
Concatenated string |
Test=$(concat ("my", "cell")) |
Test=mycell |
| Build( ) |
Constructs a definition from pieces of variables |
Test=$(build ("c:",parentdir (MS_EXAMPLE),"yourcells", ext (first (MS_EXAMPLE)))) |
Test=c:\Bentley\Workspace\yourcells.cel |
8160