Element Trees: Patterns
This section describes the element tree structure required to create patterns of features. The section on Element Trees: Principles of Feature Creation is a necessary background for this topic. Read that section before this one.
Introduction
Using Creo TOOLKIT, you can create patterns of features, including those not supported by Creo TOOLKIT feature creation. Consequently, you can programmatically create patterns of any feature that can be patterned in Creo Parametric.
The creation and manipulation of patterns use the following Creo TOOLKIT objects:
•  ProPattern—A structure that contains the type and owner of the pattern, and an opaque pattern handle
•  ProPatternClass—An enumerated type that contains the pattern class, which specifies either a feature pattern (PRO_FEAT_PATTERN) or a group pattern (PRO_GROUP_PATTERN)
The procedure for creating a pattern is similar to creating features, in that you construct an element tree and pass this element tree to Creo Parametric. When you pass the tree to Creo Parametric, you also specify the feature to be patterned.
The Element Tree for Pattern Creation
Unlike the element tree for features, the element tree for a pattern does not contain information about the construction of new features. Rather, the element tree contains information needed to make copies of existing features at specified locations on the model. For example, the element tree for a pattern of holes does not contain the geometry (such as edges) used to place the holes, but contains the dimensions and dimension variations used to pattern the specified hole.
You construct the element tree for a pattern by following the procedure described in section Element Trees: Principles of Feature Creation:
1. Allocate tree elements using the function ProElementAlloc().
2. Set values of the elements using the function ProElementValueSet().
3. Add elements to the tree using ProElemtreeElementAdd().
As with feature creation, the system cannot create your pattern unless the element tree is correct.
The element tree for a pattern is documented in the header file ProPattern.h. This tree contains the same information required when you create a pattern in an interactive session of Creo Parametric. Therefore, you should be familiar with how to create a pattern interactively before you try to understand the element tree.
Note
It is highly recommended that you use the new element tree from ProPattern.h. The old element tree is only for your reference.
The following figure shows a part of the element tree for patterns. All elements are described in detail in the following sections.
A Part of the Element Tree for Patterns
Image
The element with the identifier PRO_E_GENPAT_TYPE sets the type of the pattern to be created. The structure of the rest of the element tree depends strongly on the value of this element. Valid values for the PRO_E_GENPAT_TYPE element are as follows:
•  PRO_GENPAT_REF_DRIVEN—Reference pattern
•  PRO_GENPAT_DIM_DRIVEN—Dimension pattern
•  PRO_GENPAT_TABLE_DRIVEN—Table pattern
•  PRO_GENPAT_FILL_DRIVEN—Fill pattern
•  PRO_GENPAT_DIR_DRIVEN—Direction pattern
•  PRO_GENPAT_AXIS_DRIVEN—Axis pattern
•  PRO_GENPAT_POINT_DRIVEN—Point pattern
•  PRO_GENPAT_CRV_DRIVEN—Curve pattern
The element with the identifier PRO_E_GENPAT_REGEN_METHOD sets the regeneration method for the pattern. The regeneration method varies with the complexity of the pattern. Valid values for the PRO_E_GENPAT_REGEN_METHOD element are as follows:
•  PRO_PAT_GENERAL—General pattern. This is the most complex type of pattern.
•  PRO_PAT_VARYING—Varying pattern.
•  PRO_PAT_IDENTICAL—Identical pattern. This is the least complex type of pattern.
For more information on regeneration methods, see the Part Modeling User’s Guide.
You must populate the element PRO_E_STD_SECTION with a valid reference sketch and other related elements for the following pattern types:
•  a point pattern that uses an element of type PRO_GENPAT_REF_SKETCH
•  a fill pattern
•  a curve pattern
For more information on how to populate the section elements with the valid sketched reference, refer to the Element Trees: Sketched Features chapter.
The following sections describe the types of pattern in more detail.
Reference Patterns
A reference pattern uses an existing pattern as a guide for the placement of the new pattern members. Consequently, if the pattern type is PRO_GENPAT_REF_DRIVEN, the element tree requires only that you specify the type of the reference pattern.
Element Tree for a Reference Pattern
Image
The element with identifier PRO_E_GENPAT_REF specifies the type of pattern to be created. The valid values are as follows:
•  PRO_PAT_FEATURE—Use feature pattern references.
•  PRO_PAT_GROUP—Use group pattern references.
•  PRO_PAT_BOTH—Use feature and group pattern references.
Dimension Patterns
If the pattern type is PRO_GENPAT_DIM_DRIVEN, the element tree must include information about the dimensions used to drive the pattern. You must specify this information for each direction in which the feature is to be patterned.
Element Tree for a Dimension Pattern
Image
The elements with identifiers PRO_E_GENPAT_DIM_FIRST_DIR and PRO_E_GENPAT_DIM_SECOND_DIR contain information about the pattern dimensions.
These elements are array elements that contain as many PRO_E_GENPAT_DIM_DIR_COMPOUND elements as are required to complete the pattern. The following table describes the contents of the PRO_E_GENPAT_DIM_DIR_COMPOUND element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_GENPAT_DIR_DIMENSION
Dimension
PRO_VALUE_TYPE_SELECTION
 
PRO_E_GENPAT_DIR_VAR_TYPE
Variation type
PRO_VALUE_TYPE_INT
PRO_PAT_RELATION_DRIVEN,
PRO_PAT_VALUE
_DRIVEN
PRO_E_GENPAT_DIR_VAR_VALUE
Variation value (increment)
PRO_VALUE_TYPE_
DOUBLE
 
PRO_E_GENPAT_RELATION_EDIT
Relation
Application (PRO_VALUE_TYPE
_POINTER
)
 
The element PRO_E_GENPAT_DIR_VAR_TYPE specifies whether the pattern increment is relation-driven or value-driven. If the increment is relation-driven, the element PRO_E_GENPAT_RELATION_EDIT contains an array of wide strings whose members are individual relations.
The elements PRO_E_GENPAT_DIM_FIRST_DIR_NUM_INST and PRO_E_PAT_SECOND_DIR_NUM_INST specify the number of instances in each of the pattern dimensions.
Even if the pattern extends in only one direction, you must specify elements for the second direction. In this case, add an empty PRO_E_PAT_SECOND_DIR element and set the value of the PRO_E_PAT_SECOND_DIR_NUM_INST element to 1 (not 0).
Table Patterns
If the pattern type is PRO_GENPAT_TABLE_DRIVEN, your element tree must contain the table-driven dimensions and table information (variation in dimensions for each instance). The following figure shows the elements of the Table pattern:
Element Tree for a Table Pattern
Image
The PRO_E_GENPAT_TABLE_DIMS element is an array that contains one table dimension (PRO_E_GENPAT_TABLE_DIM) element for each dimension to be varied in the tables. The value of each PRO_E_GENPAT_TABLE_DIM element is a ProSelection object for the corresponding dimension.
The PRO_E_GENPAT_TABLE_LIST element is an array element that contains all the tables that control the pattern. This element should contain one PRO_E_GENPAT_TABLE_ENTRY element for each table.
Each PRO_E_GENPAT_TABLE_ENTRY element contains the name of the table (PRO_E_GENPAT_TABLE_NAME) and table instances (PRO_E_GENPAT_TABLE_INSTANCES).
Each PRO_E_GENPAT_TABLE_INSTANCE element contains an index number (PRO_E_GENPAT_TABLE_INSTANCE_INDEX) element and a dimensions (PRO_E_GENPAT_TABLE_INSTANCE_DIMS) element. The PRO_E_GENPAT_TABLE_INSTANCE_DIMS element is an array element that must contain one dimension value (PRO_E_GENPAT_TABLE_INSTANCE_DIM_VALUE) element for each of the selected dimensions in the PRO_E_PAT_MULT_TABLE_DIMS element. Note that the dimension value specifies the value of the selected dimension, not the dimension increment.
The following table lists the contents of each PRO_E_GENPAT_TABLE_ENTRY element.
Element ID Values
Element Name
Data Type
PRO_E_GENPAT_TABLE_NAME
Table name
PRO_VALUE_TYPE_WSTRING
PRO_E_GENPAT_TABLE_INSTANCES
Table instances
Array
PRO_E_GENPAT_TABLE_INSTANCE
Table instance
Compound
PRO_E_GENPAT_TABLE_INSTANCE_INDEX
Instance index
PRO_VALUE_TYPE_INT
PRO_E_GENPAT_TABLE_INSTANCE_DIMS
Dimension variations
Compound
PRO_E_GENPAT_TABLE_INSTANCE_DIM_VALUE
Dimension value
PRO_VALUE_TYPE_DOUBLE
The element PRO_E_GENPAT_TABLE_SET_ACTIVE sets the active table for the pattern. Valid values are 0 (for the first table) through (num_tables 1), where num_tables is the number of tables in the element tree.
Fill Patterns
A fill pattern controls the pattern by filling an area with pattern members. You can select a grid to define this area.
If the pattern type in your element tree is PRO_GENPAT_FILL_DRIVEN, the element tree must contain information about the grid and pattern members. The following figure shows the elements of the Fill pattern:
Element Tree for a Fill Pattern
Image
The element PRO_E_GENPAT_FILL_TEMPLATE_TYPE specifies the type of grid template that you want to use to create a fill pattern.
The element PRO_E_GENPAT_FILL_SPACING specifies the spacing between the pattern members.
The element PRO_E_GENPAT_FILL_BORDERING specifies the minimum distance between the centers of the pattern members and the area boundary.
The element PRO_E_GENPAT_FILL_ROT_ANG specifies the rotation angle of the grid about the Csys origin.
The element PRO_E_GENPAT_FILL_RADIUS_INC specifies the radial spacing for circular and spiral grids.
The following table lists the contents of each PRO_E_GENPAT_FILL element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_GENPAT_FILL_TEMPLATE_TYPE
Fill template
PRO_VALUE_TYPE_INT
PRO_GENPAT_SQUARE_FILL, PRO_GENPAT_DIAMOND_FILL, PRO_GENPAT_TRIANGLE_FILL, PRO_GENPAT_CIRCLE_FILL, PRO_GENPAT_CURVE_FILL, PRO_GENPAT_SPIRAL_FILL
PRO_E_GENPAT_FILL_SPACING
Fill spacing
PRO_VALUE_TYPE
_DOUBLE
 
PRO_E_GENPAT_FILL_BORDERING
Fill bordering
PRO_VALUE_TYPE
_DOUBLE
 
PRO_E_GENPAT_FILL_ROT_ANG
Fill angle
PRO_VALUE_TYPE
_DOUBLE
 
PRO_E_GENPAT_FILL_RADIUS_INC
Fill radius increment
PRO_VALUE_TYPE
_DOUBLE
 
Direction Patterns
A direction pattern adds pattern members in one or two selected directions.
If the pattern type in the element tree is PRO_GENPAT_DIR_DRIVEN, the element tree must contain the information about the two directions and the pattern members.
The following figure shows the elements of a direction pattern:
Element Tree for a Direction Pattern
Image
For a direction patter, use the elements PRO_E_DIR_PAT_DIR1_OPT and PRO_E_DIR_PAT_DIR2_OPT to specify the pattern orientation in the first and second direction, respectively. The orientation options are translation, rotation, and coordinate system.
Depending on the selected orientation, choose references for the two directions using the element PRO_E_DIRECTION_REFERENCE. To flip the selected directions, use the elements PRO_E_DIR_PAT_DIR1_FLIP and PRO_E_DIR_PAT_DIR2_FLIP. The values of the references and the choice to flip the direction are stored in the elements PRO_E_GENPAT_DIR1 and PRO_E_GENPAT_DIR2.
The elements PRO_E_GENPAT_DIR1_INC and PRO_E_GENPAT_DIR2_INC specify the spacing between the pattern members in the first and second directions, respectively.
The elements with identifiers PRO_E_GENPAT_DIM_FIRST_DIR and PRO_E_GENPAT_DIM_SECOND_DIR contain dimension information for the pattern members in the first and second direction, respectively. These elements are array elements that contain as many PRO_E_GENPAT_DIM_DIR_COMPOUND elements as required to complete the pattern. For more information on the elements PRO_E_GENPAT_DIR_DIM_COMPOUND, PRO_E_GENPAT_FIRST_DIR_NUM_INST, and PRO_E_GENPAT_SECOND_DIR_NUM_INST, refer to the section on Dimension Patterns.
The following table lists the contents of each PRO_E_GENPAT_DIR element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_DIR_PAT
_DIR1_OPT
Direction 1st option
PRO_VALUE_TYPE_INT
PRO_GENPAT_TRANSLATIONAL, PRO_GENPAT_DIR1_ROTATIONAL
PRO_E_DIR_PAT
_DIR2_OPT
Direction 2nd option
PRO_VALUE_TYPE_INT
PRO_GENPAT_TRANSLATIONAL, PRO_GENPAT_DIR2_ROTATIONAL
PRO_E_GENPAT_DIR1 and PRO_E_GENPAT_DIR2
1st direction and 2nd direction
Compound
 
PRO_E_DIRECTION_COMPOUND
PRO_E_DIRECTION_COMPOUND
Compound
 
PRO_E_DIRECTION_REFERENCE
Direction reference
PRO_VALUE_TYPE_SELECTION
 
PRO_E_DIRECTION_FLIP
Direction flip
PRO_VALUE_TYPE_INT
Value ignored
PRO_E_DIR_PAT
_DIR1_FLIP
and PRO_E_DIR_PAT
_DIR2_FLIP
1st direction flip and 2nd direction flip
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_GENPAT_DIR1_INC and PRO_E_GENPAT_DIR2_INC
1st direction increment and 2nd direction increment
PRO_VALUE_TYPE
_DOUBLE
 
PRO_E_GENPAT_DIM_FIRST_DIR
and PRO_E_GENPAT_DIM_SECOND_DIR
1st direction dimensions
Array
 
Axis Patterns
Use the axis pattern to create a pattern by revolving a feature around a selected axis. An axis pattern allows you to place members in the first direction or angular direction and in the second direction or radial direction.
If the pattern type in your element tree is PRO_GENPAT_AXIS_DRIVEN, the element tree must contain information about the pattern members in the two directions and the axis around which you want to create a pattern.
Element Tree for an Axis Pattern
Image
The element PRO_E_GENPAT_AXIS_REF specifies the axis around which you want to create the pattern. The value of this element is PRO_VALUE_TYPE_SELECTION, which is of type ProSelection.
The element PRO_E_GENPAT_AXIS1_INC specifies the spacing between the pattern members in the first direction and is of type PRO_VALUE_TYPE_DOUBLE. The first direction being angular, this distance is the angular distance and the range is -360 through +360.
The element PRO_E_GENPAT_AXIS2_INC specifies the spacing between the pattern members in the second direction and is of type PRO_VALUE_TYPE_DOUBLE. The second direction being radial, this distance is the linear distance and the range is -999999999.9999 through +999999999.9999.
The elements PRO_E_AXIS_PAT_DIR1_FLIP and PRO_E_AXIS_PAT_DIR2_FLIP flip the pattern members in the first and second direction, respectively, around the axis. These elements are of type PRO_VALUE_TYPE_INT.
The element PRO_E_GENPAT_AXIS_ANG_WHOLE specifies the angular extent of the pattern members and is of type PRO_VALUE_TYPE_DOUBLE. The range for this element is 0.0000 through 999999999.9999.
The value of each PRO_E_GENPAT_DIR_DIMENSION element is a ProSelection object for the corresponding dimensions.
The elements with identifiers PRO_E_GENPAT_DIM_FIRST_DIR and PRO_E_GENPAT_DIM_SECOND_DIR contain dimension information for the pattern members in the first and second direction, respectively. For more information on these elements, refer to the section on Dimension Patterns.
Curve Patterns
A curve pattern creates instances of a feature along a sketched curve or a datum curve.
If the pattern type in your element tree is PRO_GENPAT_CRV_DRIVEN, the element tree must contain information about the curve and the pattern members.
Element Tree for a Curve Pattern
Image
The element PRO_E_GENPAT_CRV_PNT_REF specifies the curve to be used as a reference.
After you select the reference, you can either select a sketched curve or draw a curve using Sketcher. The element PRO_E_GENPAT_CRV_PLC_TYPE specifies the curve types.
The element PRO_E_GENPAT_CRV_SPACING specifies the separation between the pattern members.
The element PRO_E_GENPAT_CRV_NUMBER specifies the number of pattern members to be created.
The element PRO_E_GENPAT_CRV_FLIP specifies flipping the curve used in patterning.
The following table lists the contents of each PRO_E_GENPAT_CRV element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_GENPAT_CRV_PNT_REF
Curve reference
PRO_VALUE_TYPE_SELECTION
 
PRO_E_GENPAT_CRV_PLC_TYPE
Curve type
PRO_VALUE_TYPE_INT
 
PRO_E_GENPAT_CRV_SPACING
Curve spacing
PRO_VALUE_TYPE
_DOUBLE
0.0000 to 1000000.0000
PRO_E_GENPAT_CRV_NUMBER
Curve number
PRO_VALUE_TYPE_INT
 
PRO_E_GENPAT_CRV_FLIP
Curve flip
PRO_VALUE_TYPE_INT
0 or 1
Point Patterns
A point pattern creates a pattern by placing a pattern member at a particular point.
The following figure shows the elements of a point pattern:
Element Tree for a Point Pattern
Image
If the pattern type in the element tree is PRO_GENPAT_POINT_DRIVEN, the element tree must contain the information about the reference point and the actual point at which you want to draw the pattern.
Use the element PRO_E_GENPAT_POINT_REF_TYPE to select the type of the point at which you want to repeat the selected feature. This selected point is the reference point for creating the pattern. You can select a point from the following options:
•  Internal or External sketch
•  Datum point feature
After the type of the reference point is set, use the element PRO_E_GENPAT_POINT_REF to select the actual point.
The following table lists the contents of each PRO_E_GENPAT_POINT element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_GENPAT_POINT_REF_TYPE
Point type
PRO_VALUE_TYPE_INT
PRO_GENPAT_REF_SKETCH, PRO_GENPAT_REF_POINT
PRO_E_GENPAT_POINT_REF
Point reference
PRO_VALUE_TYPE_SELECTION
 
Selecting References for Pattern
The compound element PRO_E_PAT_GEOM_REFS contains information about the references selected for the pattern leader.
The element PRO_E_PAT_GEOM_REFS allows you to only read the references selected for pattern leader. You cannot select the references in Creo TOOLKIT using these elements.
The following figure shows the element tree for selecting references for pattern leader:
Image
The compound element PRO_E_PAT_GEOM_REFS contains the following elements:
•  PRO_E_STD_SURF_COLLECTION_APPL—Specifies the collection of surfaces that define the leader of the geometry pattern.
•  PRO_E_PAT_CRV_DTM_REFS—Specifies the collection of curves and datums that define the leader of the geometry pattern.
The following table lists the contents of PRO_E_PAT_GEOM_REFS element:
Element ID Values
Element Name
Data Type
PRO_E_STD_SURF_COLLECTION_APPL
Reference Surfaces
PRO_VALUE_TYPE_SELECTION
PRO_E_PAT_CRV_DTM_REFS
Reference Curves and Datums
PRO_VALUE_TYPE_SELECTION
Attachment Options for Pattern
The compound element PRO_E_FLEX_OPTS_CMPND contains information about the attachment options for the pattern.
The element PRO_E_FLEX_OPTS_CMPND allows you to only read the attachment options selected for a pattern. You cannot set the attachment option in Creo TOOLKIT using these elements.
The following figure shows the element tree for attachment options for the pattern:
Image
The compound element PRO_E_FLEX_OPTS_CMPND contains the following elements:
•  PRO_E_FLEX_TRF_SEL_ATT_GEOM—Specifies if the selected rounds and chamfers that attach the patterned geometry to the model must be patterned. 1 specifies that the rounds and chamfers are patterned. When you specify 0, the selected attaching rounds and chamfers are removed.
•  PRO_E_FLEX_ATTACH_GEOM—Specifies if the geometry of the pattern members must be reattached to the model after patterning. 1 specifies that the pattern geometry is attached to the model.
•  PRO_E_FLEX_CR_RND_GEOM—Specifies if the round or chamfer geometry of the pattern members must be recreated after patterning. 1 specifies that the pattern geometry is recreated with rounds or chamfers.
The following table lists the contents of PRO_E_FLEX_OPTS_CMPND element:
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_FLEX_TRF_
SEL_ATT_GEOM
Transform selected attachment geometry
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_FLEX_ATTACH_GEOM
Attachment option
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_FLEX_
CR_RND_GEOM
Round option
PRO_VALUE_TYPE_INT
0 or 1
Pattern Features
The compound element PRO_E_PAT_APPLICATIONS contains elements for pattern applications. You can create a NC sequence using the elements under the compound element PRO_E_PAT_MFG_TOOL_PATH. You can view the various parameters of a pattern using the Pattern Recognition feature elements under the compound element PRO_E_PAT_GPRF.
NC Sequence Pattern
You can create an NC sequence by using the element tree for pattern applications. The compound element PRO_E_PAT_MFG_TOOL_PATH described in this section allows you to set various options related to manufacturing order and fixtures used to pattern an NC sequence.
The following figure shows the element tree for pattern applications.
Pattern Element Tree for NC Sequence
Image
The compound element PRO_E_PAT_MFG_TOOL_PATH contains the following elements of type integer:
•  PRO_E_PAT_MFG_ORD_LEADER—Specifies the number of the pattern member that you want to use as the manufacturing leader. The default value of this element is zero, which indicates that the pattern leader itself is the manufacturing leader.
•  PRO_E_PAT_MFG_ORDER_OPT—Specifies the criteria for selecting the manufacturing order. The valid values are:
  1— Specifies the manufacturing order based on the pattern order. Set the values of the following elements as:
  PRO_E_PAT_MFG_ORD_REVERSE—Specify 1 to reverse the order of the pattern for the CL output.
  PRO_E_PAT_MFG_ORD_ALT_ROWS—Specify 1 to set the alternate rows of the pattern in the same direction for the CL output. Here the first and the second rows are in opposite directions with the first row being in the direction of the pattern. The manufacturing leader is the first tool path in the CL output.
  PRO_E_PAT_MFG_ORD_ALT_DIR—Specify 1 to generate the CL output with the direction of the first row being treated as the direction of the second row and the direction of second row treated as the direction of the first row until the tool paths for all the pattern members are generated. The manufacturing leader is the first tool path in the CL output.
  2—Specifies the manufacturing order based on the shortest distance between the pattern members.
  3—Select the manufacturing order for each of the pattern member from the pattern UI.
Note
The functionality to select the manufacturing order for each pattern member is currently not supported through Creo TOOLKIT.
•  PRO_E_PAT_MFG_ORD_SHARED—Specify 1 to sequentially set the orders for the 4-axis or 5-axis tool paths with a common Z-axis orientation.
•  PRO_E_PAT_MFG_FIX_OFFSET—Specifies the parameters for the fixture offset. Specify 1 to set the following fixture options:
  PRO_E_PAT_MFG_FIX_OFF_INIT—Specifies the initial value of the fixture Offset.
  PRO_E_PAT_MFG_FIX_OFF_INCR—Specifies the increment value for the fixture offset.
•  PRO_E_PAT_MFG_SUB_OUTPUT—Specifies if subroutine pattern must be created. Subroutines enable you to create NC sequences, place them as macros at the beginning of the CL file, and then call them from the main body of the CL file as many times as needed.
•  PRO_E_PAT_MFG_SUB_OUT_MODE—Specifies the output mode for the CL data for the subroutine. Pass the value 1 for absolute mode and 2 for incremental mode.
•  PRO_E_PAT_MFG_SUB_OUT_MULTAX—Specifies if the Multax mode must be selected. Multax is related to cutter location output format where it puts the post-processor in the multi-axis output mode to process the i, j, k vector. When in multi-axis output mode, Creo NC outputs the i, j, k vector even when the tool is in 0, 0, 1 orientation.
In Multax mode, the system will output transformed CL data rather than outputting rotate table commands.
•  PRO_E_PAT_MFG_SUB_OUT_COPYCL—Specifies if the subroutine pattern definitions in CL output must be temporarily suppressed. The system will output CL data without the subroutine definitions and calls.
Refer to Creo NC online Help for more information on subroutines.
The following table lists the contents of each PRO_E_PAT_MFG_TOOL_PATH element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_PAT_MFG_
ORD_LEADER
Number of the leader
PRO_VALUE_TYPE_INT
0 <= value < number of instances
PRO_E_PAT_MFG_ORDER_OPT
Order options
PRO_VALUE_TYPE_INT
1, 2, 3 ( if you specify 3, order may be selected only through Creo Parametric UI)
PRO_E_PAT_MFG_
ORD_REVERSE
Reverse option
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_MFG
_ORD_ALT_ROWS
Alternate rows
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_MFG
_ORD_ALT_DIR
Alternate direction
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_MFG
_ORD_SHARED
Shared orientation
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_MFG
_FIX_OFFSET
Fixture offsets
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_MFG
_FIX_OFF_INIT
Initial fixture offsets
PRO_VALUE_TYPE_INT
1 <= value
PRO_E_PAT_MFG
_FIX_OFF_INCR
Fixture offsets increment
PRO_VALUE_TYPE_INT
1 <= value
PRO_E_PAT_MFG_SUB_OUTPUT
Subroutine option
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_MFG_SUB_OUT_MODE
Subroutine mode
PRO_VALUE_TYPE_INT
1 or 2
PRO_E_PAT_MFG_SUB_OUT_MULTAX
Subroutine multax
PRO_VALUE_TYPE_INT
0 or 1
For more information on the patterning options related to an NC sequence, refer to Manufacturing section of the Creo Parametric help.
Geometry Pattern Recognition
You can read the Pattern Recognition feature parameters using the element PRO_E_PAT_GPRF described in this section. You cannot create the Pattern Recognition feature in Creo TOOLKIT using these elements.
The following figure shows the element tree for Geometry Pattern Recognition application:
Pattern Element Tree for Geometry Pattern Recognition
Image
The pattern recognition compound element PRO_E_PAT_GPRF contains the following elements:
•  PRO_E_PAT_GPRF_TYPE—Specifies the type of geometry pattern to be recognized: Identical or Similar. It takes the integer values: 0 for Identical and 1 for Similar.
•  PRO_E_PAT_GPRF_TRF_TYPE—Specifies the recognized geometry patterns. It takes the integer value: 0 for Direction, 1 for Axis and 2 for Spatial.
•  PRO_E_PAT_GPRF_DIR1_TRF—Specifies the first direction of transformation. It takes the following integer values from the enumerated type ProGenPatternDirectionType:
  PRO_GENPAT_TRANSLATIONAL—Specifies 1 for translational pattern.
  PRO_GENPAT_DIR1_ROTATIONAL—Specifies 58 for first direction for rotational pattern.
•  PRO_E_PAT_GPRF_DIR1_NUM_INST—Specifies the number of members in the first direction or in the angular direction.
•  PRO_E_PAT_GPRF_DIR1_SPACING—Specifies the spacing between members in the first direction or the angle between members in the angular direction.
•  PRO_E_PAT_GPRF_DIR2_TRF—Specifies the second direction of transformation. It takes the following integer values from the enumerated type ProGenPatternDirectionType:
  PRO_GENPAT_TRANSLATIONAL—Specifies 1 for translational pattern.
  PRO_GENPAT_DIR2_ROTATIONAL—Specifies 60 for second direction for rotational pattern.
•  PRO_E_PAT_GPRF_DIR2_NUM_INST—Specifies the number of members in the second direction or in the angular direction.
•  PRO_E_PAT_GPRF_DIR2_SPACING—Specifies the spacing between members in the second direction or the angle between members in the angular direction.
•  PRO_E_DIR_GPRF_MOVE_OPT—Specifies if a pattern of copy-move features must be created by the geometry pattern recognition feature. Specify 1 if you want the number of pattern members and spacing to be modified.
•  PRO_E_PAT_GPRF_USE_SRF—Specifies 1 if the members in the geometry pattern recoginition feature have been limited with surfaces. This element restricts the pattern recognition to a limited region on the model.
•  PRO_E_STD_SURF_COLLECTION_APPL—Specifies the collection of surfaces that define the leader of the geometry pattern to be recognized.
•  PRO_E_PAT_GPRF_USE_SEC—Specifies 1 if a sketch has been used to limit the members in the geometry pattern recognition feature.
The following table lists the contents of each PRO_E_PAT_GPRF element.
Element ID Values
Element Name
Data Type
Valid Values
PRO_E_PAT_GPRF_
TYPE
Type of recognized pattern
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_GPRF_
TRF_TYPE
Type of transformation
PRO_VALUE_TYPE_INT
0, 1 or 2
PRO_E_PAT_GPRF
_DIR1_TRF
First transformation direction
PRO_VALUE_TYPE_INT
1, 58 or 60
PRO_E_PAT_GPRF_
DIR1_NUM_INST
Number of instances in the first direction
PRO_VALUE_TYPE_INT
 
PRO_E_PAT_GPRF_
DIR1_SPACING
Spacing in the first direction
PRO_VALUE_TYPE
_DOUBLE
 
PRO_E_PAT_
GPRF_DIR2_TRF
Second transformation direction
PRO_VALUE_TYPE_INT
1, 58 or 60
PRO_E_PAT_GPRF_
DIR2_NUM_INST
Number of instances in the second direction
PRO_VALUE_TYPE_INT
 
PRO_E_PAT_GPRF_
DIR2_SPACING
Spacing in the second direction
PRO_VALUE_TYPE
_DOUBLE
 
PRO_E_DIR
_GPRF_MOVE_OPT
Create pattern of move features
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_PAT_
GPRF_USE_SRF
Use surface for region definition
PRO_VALUE_TYPE_INT
0 or 1
PRO_E_STD_SURF_
COLLECTION_APPL
Reference surfaces
PRO_VALUE_TYPE_SELECTION
 
PRO_E_PAT_
GPRF_USE_SEC
Sketch for region definition
PRO_VALUE_TYPE_INT
0 or 1
For more information on the geometry pattern recognition, refer to the Creo Parametric help.
Obtaining the Element Tree for a Pattern
Function Introduced:
To obtain the element tree for a pattern, call the function ProPatternElemtreeCreate(). You can then use the element tree read-access functions described in the sections Feature Elements () and Feature Element Paths (), such as the functions ProElement*Get(), ProElement*Visit(), and ProElementArrayGet()).
Note
Inspection of Fill, Axis, and Directional patterns is not supported via the element tree in Pro/ENGINEER Wildfire 2.0. ProPatternElemtreeCreate() returns PRO_TK_NOT_IMPLEMENTED for fill patterns.
Visiting and Creating a Pattern
Functions Introduced:
The function ProPatternMemberVisit() visits the feature members in a pattern. This function takes the visit action function ProFeatureVisitAction() and the filter action function ProFeatureFilterAction() as its input arguments. The function ProFeatureFilterAction() is a generic action function for filtering features from a pattern. It returns the filter status of the features in the pattern. This status is used as an input argument by the function ProFeatureVisitAction().
The function ProPatternMembersGet() returns the feature members in a pattern. For a group pattern, the output argument is a group pattern feature.
When your element tree is complete, create the pattern by calling the function ProPatternCreate(). This function requires as input the feature (ProFeature) to be patterned and the pattern class (feature or group) of the new pattern.
To obtain the ProPattern handle for the new pattern, call the function ProFeaturePatternGet() with the same input feature as ProPatternCreate(). For more information on the function ProFeaturePatternGet(), refer to the section Manipulating Patterns in the Core: Features chapter.
The function ProPatternInAssemblyCreate() creates a pattern in the assembly that is provided in the element tree. The input parameters are as follows:
•  p_component_path—The component path specified using the structure ProAsmcomppath.
•  pattern_feature—Feature defined by the ProFeature object.
•  pat_class—Pattern class defined by the enumerated data type ProPatternClass.
•  elem_tree—The root element of the pattern element tree.
You must specify the pattern object for this function because a feature pattern can be a part of both a group pattern and a feature pattern.
The function returns the error PRO_TK_ABORT if the pattern feature creation failed. You must ensure that you use a new pattern name every time you create a new pattern.