Patterns 2D
- Last UpdatedApr 11, 2025
- 8 minute read
Patterns2d configuration allows you to select, via Conditions, which type of graphical objects to amend so that tags can be associated or disassociated with graphical elements using the Group and Ungroup functions and add new Attributes to the grouped and ungrouped objects. The Patterns2d extension is similar to base mapping of engineering objects but allows transformations related to graphical objects.
It is possible to filter objects by attributes and associations kept in engineering data associated to graphical elements. Select types of graphical objects that will be grouped in the defined area around selected object.
The following is the complete set of configuration settings supported by Patterns2d extension:
<Patterns2d xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
sourceProductName="AVEVA™ Gateway for 2D Data" componentName="Patterns2d" componentVersion="2.10.0.0"
<Object>
<Conditions>
<ObjectType ObjectType="
symbol,
symbol_single,
symbol_single_textonly,
symbol_nested,
symbol_nested_textonly,
table,
dimension,
mleader,
mtext,
oval,
circle,
ellipse,
arc_closed,
arc_open,
all_lines_closed,
polyline_closed,
spline_closed,
region,
text,
line,
all_lines_open,
polyline_open,
spline_open,
point,
3dsolid,
leader,
fill"
/>
<Attribute Name="handle"
Value=".*" />
<Association Type="is a part of"
TargetAttributeName=".*"
TargetAttributeValue=".*" />
<Size min="0"
max="30" />
<NumberOfObjects min="1" max="80000" />
</Conditions>
<Group Separator="-" JoinTextFrom="topleft" IncludeParts="false" GrabTypes="
all,
symbol,symbol_single,
symbol_single_textonly,
symbol_nested,
symbol_nested_textonly,
table,
dimension,
mleader,
mtext,
oval,
circle,
ellipse,
arc_closed,
arc_open,
all_lines_closed,
polyline_closed,
spline_closed,
region,
text,
line,
all_lines_open,
polyline_open,
spline_open,
point,
3dsolid,
leader,
fill"
OrderByGroup="true"
KeepTextOnly="true" >
<IncludeArea allDirections="1.1"
top="0.6"
bottom="5.0"
right="1.5"
left="0.9"
/>
</Group>
<Attribute Name="grouped" Value="" />
<Attribute Special="ExtentCoordinates" />
<Ungroup KeepSingleSymbols="true" />
</Object>
</Patterns2d>
Graphical types from AutoCAD and MicroStation drawings are extracted as the following Patterns 2D types (for the purpose of grouping):
|
AutoCAD type |
Attribute 'cad type' |
Patterns 2D type |
|
Block Reference |
blockreference |
symbol |
|
Proxy |
proxyentity |
symbol |
|
Table |
table |
table |
|
Dimension (all types) |
dimension |
dimension |
|
Multileader |
mleader |
mleader |
|
MText |
mtext |
mtext |
|
Circle |
circle |
circle |
|
Ellipse |
ellipse |
ellipse |
|
Arc |
Arc |
arc |
|
Polyline |
polyline |
polyline |
|
Spline |
spline |
spline |
|
Region |
region |
region |
|
Text |
text |
text |
|
Line |
line |
line |
|
MLine |
line |
line |
|
Dot |
point |
point |
|
Leader |
leader |
leader |
|
Hatch |
hatch |
fill |
|
3DSolid |
3dsolid |
3dsolid |
|
MicroStation type |
Attribute 'cad type' |
Patterns 2D type |
|
Cell |
cell |
symbol |
|
Shared Cell |
cell |
symbol |
|
Smart Solid |
cell |
symbol |
|
Tagged object + Tags |
cell |
symbol |
|
Complex Shape |
complexshape |
symbol |
|
Table |
table |
table |
|
Dimension (all types) |
dimension |
dimension |
|
Note |
mleader |
mleader |
|
Node |
mtext |
mtext |
|
Circle |
circle |
circle |
|
Ellipse |
ellipse |
ellipse |
|
Arc |
arc |
arc |
|
Complex Chain |
polyline |
polyline |
|
Bspline Curve |
spline |
spline |
|
Associative Region |
region |
region |
|
Shape |
region |
polyline |
|
Text |
text |
text |
|
Line |
line |
line |
|
Multi-Line |
point |
point |
|
Line (zero length) |
point |
point |
|
Graphics with Fill set to Opaque or Outlined |
hatch |
fill |
|
Graphics with Pattern |
hatch |
fill |
Graphical types from Smart P&ID and SmartSketch drawings are extracted as the following Patterns 2D types (for the purpose of grouping):
|
SmartSketch Type |
Cad Type Attribute |
Patterns2d Type |
|
Arc2d |
arc |
arc_open, arc_closed |
|
SmartLabel |
smartlabel |
symbol |
|
Boundary2d |
hatch |
fill |
|
BSplineCurve2d |
spline |
spline_open, spline_closed |
|
Circle2d |
circle |
circle |
|
ComplexString2d |
complexstring |
symbol |
|
Connector |
connector |
symbol |
|
Ellipse2d |
ellipse |
ellipse |
|
EllipticalArc2d |
arc |
arc_open, arc_closed |
|
GluePoint |
gluepoint |
symbol |
|
Group |
group |
symbol |
|
Line2d |
line |
line |
|
LineString2d |
polyline |
polyline_open, polyline_closed |
|
Point2d |
point |
point |
|
Terminator |
terminator |
symbol |
|
Rectangle2d |
polyline |
polyline_closed |
|
SmartFrame2d |
smartframe |
symbol |
|
Symbol2d |
symbol |
symbol |
|
TextBox |
text |
text |
|
Combination of objects associated by ModelID and references |
combinedsymbol |
symbol |
|
Attribute Set |
attributeset |
- |
Notes:
-
symbol is the generic term for a block reference, cell, symbol or shape, depending on the source system.
-
Attributes called "cad type" are added during extraction to recognized objects and are used to identify object types, especially through transformation in Patterns 2D. They can be removed later in the Base Mapping so that they do not appear in the output EIWM and CSV.
When objects in Patterns 2D are grouped into one, the "cad type" attribute value will change to "n/a" because it will no longer represent a single source object.
Conditions: ObjectType, Attribute, Association, Size, NumberOfObjects.
Attribute and Association conditions can be used multiple times and ObjectType, Size, NumberOfObjects conditions can be used only once.
Due to regular expressions used for Attribute and Association settings, specify multiple values to extend the range of selected objects.
When multiple criteria are used in a Condition only objects that satisfy all the criteria are selected for the subsequent actions.
The Patterns2d Conditions are as follows:
-
ObjectTypes: This is mandatory and allows selection by object type, where at least one type must be provided. Some keywords represent a few types:
-
all: all object types
-
symbol: symbol_single, symbol_single_textonly, symbol_nested, symbol_nested_textonly
-
symbol_single: symbol_single_textonly
-
symbol_nested: symbol_nested_textonly
-
oval: circle, ellipse, arc_closed
-
allLines_open: polyline_open, spline_open
-
allLines_closed: polyline_closed, spline_closed, region
-
Attribute: (optional) Same condition as in Base Mapping.
-
Association: (optional) Same condition as in Base Mapping. Additionally, this parameter allows filtering by TargetAttributeName and/or TargetAttributeValue.
-
Size: (optional) Refers to size of the object in comparison to the drawing's size. Default =100 (%) values: from 0.0 to 100.0.
Specify the minimum and maximum (min and max) size of the objects that should be selected for grouping or ungrouping. Values provided denote the percent range within which a given object must fit in relation to the entire square area of the drawing.
For example: <Size min="3" max="10"/> means that objects whose rectangular area takes at least 3% and not more than 10% of whole drawing area will take part in the selected action (Group or Ungroup).
-
NumberOfObjects: 'This parameter allows you to select graphical objects based on the number of elements, for example, if the ObjectType is mtext and NumberOfObjects has min="3" and max ="3" then only tuplets (tags consisting of 3 lines) will be selected.
(optional) default =1000000000, values: from 0 to 1000000000.
Grouping:
-
Group: This action aggregates all of the objects selected by the Conditions into a single grouped object with ObjectID formed from the concatenation of its text elements from the labels belonging to the objects included in this group. When a Group is created then regardless of what types of objects belong to that group, it contains only one tag and does not contain any children objects. This way of storing data is adjusted to rendering systems like Workhub and Dashboard will provide proper tagging and highlighting of tagged objects.
Note: The minimum number of objects in a group is one single text object. A group can contain any number of primitives. After an object is assigned to a group, it won't be subject to any subsequent Group or Ungroup actions.
Settings:
-
Separator: Any string, default '-', used for concatenating text items into common ID.
-
JoinTextFrom: Default: topleft, values: top, bottom, right, left, topleft, topright, bottomleft, bottomright, used for setting from which direction text will be concatenated.
Note: If the text is rotated from the horizontal it is first unrotated before the JoinTextFrom directions are applied. If grouped text objects are rotated from the horizontal and the maximum difference between all texts angles is less than 5%, then they are first unrotated before the JoinTextFrom directions are applied.
-
TextControlPoint: The order of concatenation is determined by the position defining the location of each text element.
There are two values: Center (Default) and Edges (which is the start position in X, Y of each text element).

-
IncludeParts: If set to true, then any object that is partly within the selected object's extents will be included in the group, otherwise, if false (default) only objects that are fully enclosed in the selected objects extents will be grouped.
-
GrabTypes: Filters which type of objects will be grouped together. The default is text and mtext and all other object types are allowed (see example above).
Objects of types selected for GrabTypes are collected into one tagged group.
Note: If there is no text object in the group, then ID is not set but objects are still grouped. Use Base mapping to tag these objects, therefore, it's best to apply Pattern 2D mapping before Base mapping.
-
KeepTextOnly: If true, then regardless of what types of objects are selected by Conditions, GrabTypes and IncludeArea, only text objects. This way of tagging can be useful in the systems where during selection only highlighting of the text is expected.
-
IncludeArea: Allows you to vary the search area of the object's extents by changing its overall size either symmetrically (if allDirections parameter is used) or in each orientation direction (if top, bottom, left or right is used, including combinations of these).
Examples:
-
allDirections=2.5
-
left=0.5 right=2.3 top=2.0 bottom=0.1
For example, left=0.5 and bottom=2.0 means searching for objects in 50% of horizontal length of the object (right-half of the original extent), additionally, this extent area will be extended into bottom direction; and vertical length will be extended to 200% of the original length.
-
-
When left+right<1.0 or top+bottom<1.0 or allDirections<0.5, then a configuration error is generated.
-
Therefore, the minimal settings will provide at least a single common point (allDirections=0.5) or a single line (right+left=1 or top+bottom=1), if IncludeParts="true" and will result in including all objects crossing that common point or that single line.

Note: By default, if the IncludeArea setting is not used, then all values are set to 0 for Object types symbol, table, dimension, text, mtext, mleader; so only child objects that belong to the main object are grouped regardless of their location. You may include objects which do not belong to the main object by increasing values in the IncludeArea setting. This will add some objects placed within the main object's extent or also add some objects which are placed out of the main object's extent.
For the rest of the Object types that do not have any child objects, default value of IncludeArea parameter for each of these attributes is set to 1.0 (100%). This means grouping all child objects from the extent of the main object. This range can be reduced by using values less than 1.0 or can be extended by setting more than 1.0.
-
Attribute: Adds attribute to grouped object. Name is mandatory, Value is optional. Add any number of attributes, including attributes normally set in Base mapping such as ClassID.
-
Attribute Special="ExtentCoordinates": If specified then the grouped object's extents are added as four attributes containing the coordinates of the minimum and maximum positions: #Xmin#, #Xmax#, #Ymin#, #Ymax# .
Ungrouping
-
Ungroup: Works in the opposite way to grouping by splitting structured data into smaller chunks so they can be used independent-single objects or single symbols, depending on the setting. It uses the same conditions for grouping but uses a different (shorter) list of objectTypes for filtering only those objects having structure to ungroup:
-
symbol
-
symbol_Single
-
symbol_SIngle_TextOnly
-
symbol_Nested
-
symbol_Single_TextOnly
-
table
-
dimension
-
mtext
-
mleader
-
Settings:
-
KeepSingleSymbols: If this option is set to true, then symbols are not ungrouped completely to separate objects level but ungrouping stops when each symbol no longer contains any nested symbol. In other words, with this option all nested symbols are moved to the root level.
Note: This setting does not have an effect on other structured data that do not contain symbols.
Additional Notes:
-
Any number of ‘Object’ nodes can be defined.
-
In each 'Object' node, you only use a ‘Group’ or ‘Ungroup’ node but not both.
-
Do not group the same object twice.
-
If you ungrouped symbol_nested into multiple symbol_single objects, you still use another 'Object' node to ungroup symbol_single into separate primitives.
-
Using multiple Patterns2d extension configurations provide the same effect like using multiple 'Object' nodes in one Patterns2d extension configuration.
-
Objects extracted by the Smart P&ID Extractor save tag-related text in attributes named "#TEXT#" and multiple graphics may be extracted as a single object. These objects cannot then be ungrouped in Patterns 2D but may still be grouped with other objects. In this case the Patterns 2D grouping behaviour would apply where if there are multiple "#TEXT#" attributes then the ObjectID of the group is a concatenation of these values, ordered by direction configured in the Patterns 2D configuration. If the objects have not been grouped by Patterns 2D, then base mapping may be needed to assign their "#TEXT#" values to ObjectID.
-