cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How do I create a pattern again with reference to the pattern generated by the toolkit code?

CHASEONHO
18-Opal

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

2 REPLIES 2

status = ProElementAlloc(PRO_E_GENPAT_REGEN_METHOD,&elem_rgn);
status = ProElementIntegerSet(elem_rgn,PRO_PAT_VARYING);

 

Can be referenced by replacing existing RO_PAT_GENERA with PRO_PAT_VARYING.
Another problem occurred.
ProPatternCreate uses a ProFeature object.
How do I create a reference pattern for ProMdl?

 

Warm Regards,

SeonHo

RPN
17-Peridot
17-Peridot
(To:CHASEONHO)

 

// Create the Tree

 status = ProElementAlloc (PRO_E_PATTERN_ROOT, &elem_tree);
 status = ProElementAlloc (PRO_E_GENPAT_REF,  &elem_type);
 status = ProElementIntegerSet (elem_type,PRO_PAT_FEATURE);
 status = ProElemtreeElementAdd (elem_tree,NULL,elem_type);

 

// Init the feature by ID

  tk_status = ProFeatureInit( model , feat_id , &feature );

  tk_status = ProPatternCreate(&feature,PRO_FEAT_PATTERN,elem_tree);

 

 

// as far I know, thats it

 

//In tcl (simple function)  Smiley Happy

ps_feat refpattern -model ?Model? ListOfFeatureIDs

Top Tags