How do I create a pattern again with reference to the pattern generated by the toolkit code?
We created a pattern Refer to TestPatternCreate.c to create a dimension pattern for points.
We could create a reference pattern by creating a dimension pattern for a point in Creo, clicking on the coordinate system, and activating the pattern.
How can the toolkit refer to a dimension pattern created for a point and apply it to other features (or components)?
status = ProPatternCreate (& p_feature, PRO_FEAT_PATTERN, elem_tree);
>> We have created a pattern for points.
status = ProElementAlloc (PRO_E_PATTERN_ROOT, & elem_tree);
status = ProElementAlloc (PRO_E_GENPAT_TYPE, & elem_type);
status = ProElementIntegerSet (elem_type, PRO_GENPAT_REF_DRIVEN);
status = ProElemtreeElementAdd (elem_tree, NULL, elem_type);
status = ProElementAlloc (PRO_E_GENPAT_REF_TYPE, & ref1);
status = ProElementIntegerSet (ref1, PRO_PAT_FEATURE);
status = ProElemtreeElementAdd (elem_tree, NULL, ref1);
status = ProPatternCreate (& feature, PRO_FEAT_PATTERN, elem_tree);
>> The toolkit attempted to create a pattern that refers to a pattern generated for a point.
The result is failure.
Where is the problem?
Warm Regards,
SeonHo

