Extracting Attributes¶
Once DataSeer has identified a symbol, its record will be logged as a row in the CSV output files that DataSeer produces. Beyond the capturing the Symbol's Type
and Drawing Number
information, users can popluate additional dimensions of data associated with each symbol referred to as Attributes. These attributes can be modified in-project via each symbol's Attribute Editor table.
Editing Symbol Attributes¶
Here's how to edit the attributes for a symbol:
- Open the project.
- Open the Symbols tab.
-
Select the symbol class on the sidebar:
- Valves
- Instrumentation & Controls
- Other
-
Select the symbol type.
The Attributes Editor displays with a list of extracted symbols.
-
Locate the symbol in the list.
-
Edit the attributes:
Info
- To edit the data in a cell, click the cell, update the value, and press Enter
- To clear the data in a cell, select the cell or row and press Del
Detecting Symbol Attributes¶
The Attribute Search/Find Attributes features detects specific text attributes for valves and instruments symbols and allows you to import these values into their corresponding columns on the Attribute Editor. This saves you from having to manually transcibe the text data from diagram to table.
Here's how to find a symbol's attributes:
- Open the project.
- Open the Symbols tab.
- Select Instruments or Valves on the sidebar:
-
Select one of that class's type.
The Attributes Editor displays.
-
Click Find Attributes in the Attribute Editor Header.
The Find Attributes modal displays.
-
Select the desired Attributes to extract.
-
(Optional) In Search Pattern, enter a regex pattern to help identify the correct text information.
Default RegEx
Each attribute has a default Regular Expression for searches where no pattern is given.
External Attributes Only: the search area around valves where DataSeer looks for attributes can be adjusted using the SEARCH AREA sliders to adjust the size of the search area. Users may click an area around the symbol itself to recenter the search area entirely.
Valve Attributes Locations
If the attributes such a Valve's ID or Size is located in the general area around a symbol, BUT in inconsistent locations relative to the valve itself. The user is best using the tool as a general search radius to return accurate results. This is done by leaving the search area centered on the symbol itself and then adjusting the Height and Width factors to create a conservative boundary in which to find the desired string(s).
-
Click OK.
The Review Attributes window displays each symbol's current attributes values and the results of the search.
-
Review detection results, choose to import new detected text or retain current attribute data.
-
Click OK to finish.
DataSeer imports attributes into the Attributes Editor.
- Open the project.
- Open the Symbols tab.
-
Click on Attribute Search in the toolbar.
The Attribute Search modal displays
-
Choose the desired class of symbols to detect attributes for.
Click Next
-
Choose the desired symbols to be included within this attribute search.
Click Next
-
Choose the desired attributes to conduct the search for.
-
(Optional) In Search Pattern, enter a regex pattern to help identify the correct text information.
Default RegEx
Each attribute has a default Regular Expression for searches where no pattern is given.
Valve Attributes Only: the search radius around valves where DataSeer looks for attributes can be adjusted using the SEARCH AREA slider.
-
Click Run Search
-
Review detection results, choose to import new detected text or retain current attribute data.
-
Click OK to finish.
DataSeer imports attributes into the Attributes Editor.
Multi-String tags
DataSeer's tag detection assumes the user is searching for a single string (word) tag, so it can return very accurate text results. IF your target tags are multi-string or even multi-line, simply include these regex patterns (\s
& \n
) as part of your RegEx input.
Associating Symbols & Lines¶
When you extract symbols and line numbers in the same project, you can associate the symbols with the lines where they are physically located. This lets you group items together by line and makes for easier export of data into project deliverables.
There are two ways to associate symbols with line numbers:
Here's how to associate symbols with line numbers automatically:
-
Extract line numbers from diagrams.
Important
You must assign the line numbers to the Line Number category.
-
Extract symbols from diagrams.
-
Select the symbol class on the sidebar:
- Valves
- Instrumentation & Controls
- Other
-
Select the symbol type.
The Attributes Editor displays.
-
Click Link Line Numbers.
The Associate Text window displays.
-
Click YES.
The Review Attributes window displays with a list of matches.
-
Click OK.
The Attributes Editor displays the line numbers identified during the search.
-
(Optional) Complete the following to associate all other symbol types with line numbers:
- Click on the Navigation bar.
- Click on the project and select Download Digital Conversion data.
- Click LAUNCH to reopen the project.
-
Select a symbol class on the sidebar:
- Valves
- Instrumentation & Controls
- Other
-
Select a symbol type.
- Review the line numbers identified.
Limitations
The model used for the Automated workflow won't make symbol to line number associations if:
- The symbol is a reducer, flange, or angle valve. These symbols indicate a change in flow characteristics and typically have more than one line number associated.
- The symbol has more than one line number associated, i.e. there's a line number on each side of the symbol.
- The line number is labeled with an arrow/pointer to the line and not "on" the line.
- The line is dotted or dashed.
- The line is an offshoot (loop) from a main line.
If you are affected by these limitations, use the Semi-Automated workflow to make the symbol to line number associations.
Here's how to associate symbols with line numbers as you go:
-
Extract line numbers from diagrams.
Important
You must assign the line numbers to the Line Number category.
-
Extract symbols from diagrams.
-
Select the symbol class on the sidebar:
- Valves
- Instrumentation & Controls
- Other
-
Select the symbol type.
The Attributes Editor displays.
-
Select the symbol in the list.
-
Click in the Line Number field and select a line number to associate with the symbol.
Associating Symbols & Text¶
Text data can be manually associated with a symbol when the proximity of the text and symbol is too great to leverage the Find Attributes tool. Using the association option allows the user to forgo the manual data transcription.
Note
Text objects must first be defined for mapping to occur.
Here is how to associate text within the attribute editor:
Here is how to create a new attribute column and associate text to a symbol:
- Navigate to a symbol's Attribute Editor.
- Click Associate New Attribute in the Editor header.
- Select the predefined text object you wish to associate with a symbol.
- Give a name to the attribute.
- Select the symbol to map the attribute to.
- Navigate to a symbol's Attribute Editor.
-
Click the "Associate Text" symbol within the desired cell to fill with text data.
-
Select the predefined text object(highlighted on page) to import the information to the attribute cell.
Modifying Symbol Attributes¶
You can add or remove the attribute fields that display for symbols on the Attributes Editor. This makes it easier to record all of the necessary details for each item.
Here's how to modify the attribute fields on the Attributes Editor:
- Open the project.
- Open the Symbols tab.
-
Select the symbol class on the sidebar:
- Valves
- Instrumentation & Controls
- Other
-
Select the symbol type.
The Attributes Editor displays with a list of extracted symbols.
-
Click Modify Attributes.
-
Modify the attributes:
- Click in the Available list.
- Enter a name for the attribute and press Enter
- Select the attribute to the Active list.
- Click
- Click Set Attributes.
- Click next to the attribute.
- Enter a new name.
- Press Enter
- Select the attribute in the Active list.
- Click
- Click Set Attributes.
Tips¶
Searching with Regex¶
You can use regex patterns (regular expressions) to ensure the scope of your text based data search only captures results that relate to your targetted attribute/symbol.
Common Regex Characters
These are common regex characters that you can use to provide targeted yet flexible inputs to your text searches.
Regex Character | Meaning | Example | Interpretation | Potential Matches |
---|---|---|---|---|
^ | Begins with | ^SH | Matches strings that begin with "SH" | SH9821 , SHIFT |
$ | Ends with | 02$ | Matches strings that end with "02" | A8202 , 99902 |
\d | Any digit | \d | Matches any digit | 9 , 6 |
[A-Za-z] | Any letter | [A-Za-z] | Matches any letter | T , v |
\w | Any word character | \w | Matches any word character | 5 , B , y |
\s | Any whitespace character | \s | Matches any whitespace character | whitespace |
\n | Newline | .*\n.* | Matches strings that expand into a second line | line one |
line two | ||||
. | Any character | . | Matches any character | - , 9 , r |
Using non-wildcard characters
It is appropriate to use the explict letter or number characters in your search patterns if there is no variance among your targetted strings. Example: Say my ID tags all begin with LV
followed by four numbers. I could use ^LV\d{4}$
to collect detect these strings.
Common Regex Pattern Tokens
These pattern tokens help you indicate how many times a specific character should appear within a string.
Regex Token | Meaning | Example | Interpretation | Potential Matches |
---|---|---|---|---|
? | The preceding character appears zero or one times | \d? | Matches strings where a digit appears zero or one times | REST , Nine4 |
* | The preceding character appears zero or more times | [a-z]* | Matches strings where a lower case letter appears zero or multiple times | 9981 , 97w1 |
+ | The preceding character appears one or more times | [A-Z]+ | Matches strings where an upper case letter appears one or more times | A , RT |
{3} | The preceding character appears exactly three times | E{3} | Matches strings with three consecutive "E" characters | 67EEE , THREEE |
{3,} | The preceding character appears three or more times | t{2,} | Matches strings with two or more consecutive "t" characters | 88tt |
{3,6} | The preceding character appears between three and six times | o{1,3} | Matches strings with one or up to three consective "o" characters | those , 77ooo |
Example: Valve Attributes
For this example imagine your valve attributes are displayed as such on your diagram.
Since the Size
and ID
attributes are on the same X-Axis (level on the page) we will need to use explicit starts with(^
) and ends with($
) characters to match the correct string to the correct attribute. Using such characters is considered best practice when it comes to getting accurate attribute detection.
While detecting your attributes you will likely have some variance in how a given symbol's tags are presented on a diagram. For this example lets list a few other examples of Size
and ID
strings that our search needs to capture.
Attribute | Sample 1 | Sample 2 | Sample 3 | RegEx Pattern |
---|---|---|---|---|
Size | 2" | 1 1/2" | 3" | ^\d\s?\d?\/?\d?"$ |
ID | GN0606E | GA0832P | GA1532V | ^[A-Z]{2}\d{4}[A-Z]$ |
To address the variance in Size
we could use the pattern ^\d\s?\d?\/?\d?"$
which employs the "zero or one of" character, ?
to allow for the existence of the additional space, fractional backslash and additional digits that may occur in the fraction or mixed number formats. The only required characters that need to exist for a match would be the digit that starts the string and the inch("
) character it ends on.
To capture all examples of ID
in a single pass we could use the patten ^[A-Z]{2}\d{4}[A-Z]$
which detects strings that start with two capitalized letters, followed by four digits and ends with a capitalized letter. The *
input acts a the single word search flag for DataSeer.
Common String Patterns
Here are some examples of common attribute strings variations and RegEx patterns to address them.
Sample 1 | Sample 2 | Sample 3 | RegEx Pattern |
---|---|---|---|
BA-1 | VA-10 | BB-5 | ^[A-Z]{2}-\d\d?$ |
10mm | 2mm | 15.5mm | ^\d\d?.?\d?mm$ |
VALV-997432 | VAT-996621 | VALV-997198B | ^VA[A-Z]{1,2}-\d{6}[A-Z]*? |
To learn more about how to use regex, and test out your regular expressions check out the regular expressions 101 site.