Top Level:

WildCards

KHA-SD Help Group Policy SD Config Client Management CAD Info & Help Projects Site Map

Peer Level: Up Pen Tables WildCards

Child Level:
Up

Pen Table  Wildcards

Help Link: MicroStation Help>Contents>Printing Guide>Batch Printing>Defining Print Specifications.

From Michael Eyre of the San Diego Bentley Users Group:

One of our SDBUG members, Dean Brady of PBS&J, did some digging in the Bentley tech notes and was able to discover that this is possible to use of wildcards through the use of a configuration variable! Good news for those of us who have to edit several of these pen tables quickly.

The variable is called MS_PENTABLE_REGEX_LEVEL_COMPARE and you can set it to a value of 1 to activate it. This variable allows you to use regular expressions to discover pen table level names. On our Data page, you will find a sample pen table that I built in the CalTrans style, searching for levels whose names start with the numbers 1-63, regardless of what other characters are in the level name. The pen table finds the levels (with the exception of the default level which does not start with a number) and then changes the output color of the elements on the numbered levels to color 2.

The syntax for the regular expressions is the same as for batch plot specifications.. The syntax is documented in the MicroStation main help file.

Character

Meaning

c any non-special character c matches itself.
\c turn off special meaning of character c.
^ beginning of line.
$ end of line.
. any single character.
:a any alphabetic character [a-z|A-Z].
:d any digit [0-9].
:n any alphanumeric character [a-z|A-Z|0-9].

Also, a colon followed by a space matches any punctuation character.

[…] any one of characters in …; ranges like a-z are legal.
[^…] any single character not in …; ranges are legal.
s* zero or more occurrences of string s (the preceding character).
s+ one or more occurrences of string s (the preceding character).
st string s followed by string t.

 

Examples

Take, for example, the case where there are six references attached — print1.dgn, print2.dgn, print3.dgn, printa.dgn, printb.dgn, and prelim.dgn.

The following table shows those filenames that are matched when using various reference filename specifications.

Specify

To find the following

p.* All six references.

Finds all files beginning with the letter “p” followed by zero or more of any other characters.

print:d.dgn Three references — print1.dgn, print2.dgn and print3.dgn.

Finds all files beginning with “print” followed by a single digit and then “.dgn.”

print:a.dgn Two references — printa.dgn and printb.dgn.

Finds all references beginning with “print” followed by a single alphabetic character and then “.dgn.”

print:n.dgn Five references — all but prelim.dgn.

Finds all references beginning with “print” followed by a single alphanumeric character and then “.dgn.”

 

Site Map       Contact Jeff Martin with comments/concerns.        KHA San Diego Transportation Group.                    this page last edited: 2008-01-17 16:26