You can extract notes from a SOLIDWORKS document.
When working with SOLIDWORKS drawings, you can extract notes only for the
drawing, for the drawing and the sheet format layer, or for none at all.
When you extract notes for the drawing and sheet format layer, SOLIDWORKS
Inspection extracts all notes, including some that are not typically characterized, such
as the company address and other information in the title block. When you extract notes
for only the drawing, you sometimes exclude notes that you
want.
SOLIDWORKS Inspection uses advanced note filtering based on a regular
expression engine.
Regular Expressions
A regular expression is a pattern that describes a piece of text.
Regular expressions let you search text based on the text structure versus the text
itself. A regular expression engine is a software component that searches text for
matches to regular expressions.
You can use regular expression development tools to create regular
expressions. Below are some regular expression definitions and constructs to help
you create regular expressions.
Definitions
Literal |
A character or series of
characters you want to find. For example, if you list row as the regular expression, a
search returns the word browns, but not the word worse. |
Metacharacter |
One or more characters that are not literals in the
expression. For example, the caret (^) is a
metacharacter
that tells the regular expression to look for all text that does not
match anything after the caret. ^T matches all strings that do not contain an
uppercase T.Other
metacharacters include:
- \d. Matches a whole number, equivalent
to [0-9].
- \D. Matches a nondigit character,
equivalent to [^0-9].
- \r. Matches a carriage return character
in a string.
- \s. Matches any white space including a
space, tab, or form feed character in a string.
- \S. Matches any nonwhite space
character in a string.
- \w. Matches any alphanumeric character,
including underscores.
|
Escape
sequence |
A literal or
metacharacter
preceded by a backslash. If you precede certain literals with a
backslash, you convert them to
metacharacters. For example, \d finds any digit (0 through 9). If you
precede a
metacharacter
with a backslash, you tell SOLIDWORKS Inspection to find the
metacharacter
itself. \^ finds the
caret character.
|
Constructs
Metacharacter
Usage |
Format |
Description |
Or |
x
| y |
Matches if the searched text meets
either the pattern before the | character or the pattern after
it. |
Beginning of string |
\b(xyz) |
Matches the expression if it
occurs at the beginning of the text. |
Number of instances |
x[n]y[n] |
Matches the expression if it appears the specified
number of times. For example,
x[2]y[0,3]
matches two instances of text that match x and between zero and
three instances of text that match y.
|
Escape sequence |
\ |
Turns a
metacharacter
into a literal or turns a literal into a
metacharacter. |
Digit |
\d |
Looks for a numeric character (0 through 9). You can
combine with the number of instances
metacharacter
to look for numbers of specific size. For example,
\d[3]
matches all three-digit numbers.
|
Example 1
With this string, two notes are ballooned based on the extraction criteria:
INSPECT
Example 2
With this string, three notes are ballooned based on the extraction criteria:
INSPECT|CHECK|VERIFY
Example
3
With this string, two notes are ballooned based on the extraction
criteria:
(\d{1,3}\.\s{0,3}.*)|<MOD-DIAM>.*|^R\s{0,2}\.\d{1,4}.*|^RUN@.*|(\.\d{1,3}\s{0,3}X\s{0,3}\d{1,3}.*)|MARK.*

If you used no extraction criteria, all notes are extracted:

The following table describes the extraction criteria.
Extraction Criteria |
Definition |
\d{1,3} |
1 to 3 digits |
\. |
Followed by a period |
\s{0,3} |
Followed by 0 to 3 white space
characters (such as a space or tab) |
.* |
Followed by any number of
characters |
<MOD-DIAM> |
Diameter symbol anywhere in
string |
.* |
Followed by any number of
characters |
^R |
R at the beginning of
string |
\s{0,2} |
Followed by 0 to 2 white space
characters |
\. |
Followed by a period |
\d{1,4} |
Followed by 1 to 4 digits |
.* |
Followed by any number of
characters |
^RUN@ |
RUN@ at the beginning of
string |
.* |
Followed by any number of
characters |
\. |
String with a period |
\d{1,3} |
Followed by 1 to 3 digits |
\s{0,3} |
Followed by 0 to 2 white space
characters |
X |
Followed by X |
\s{0,3} |
Followed by 0 to 2 white space
characters |
\d{1,3} |
Followed by 1 to 3 digits |
.* |
Followed by any number of
characters |
MARK |
String with MARK |
.* |
Followed by any number of
characters |