Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi Patrick,
I think the component parameter is a feature parameter. Because the component is a feature type. So you need to get the feature link to that kind.
pro_error_fpar = ProSolidFeatVisit((ProSolid)mdl, (ProFeatureVisitAction)deleteKEParameterVisitAction, NULL, NULL);
ProError deleteKEParameterVisitAction(ProFeature * p_feature, ProError perr, ProAppData pad) {
ProParameterVisit(p_feature, NULL, deleteModelParameterVisitAction, pad);
return PRO_TK_NO_ERROR;
}
There you should find the parameters. Be sure to check if the feature is from type component feature.
Best regards,
Eike
Aunt Edit: I checked these only in WF 4.0 and Creo 2.0 and think that it should work in WF5.0 too.
Hi all,
Patric Eike is right. An assembly component should be treated as a feature.
You should pass ProAsmcomp as ProModdelitem to parameter functions.
To get to ProAsmcomp would be from ProAsmcomppath - there are a lot of examples in user manual.
If you have a component selection then ProSelectionAsmcomppathGet would get you component path.
comp_path.comp_id_table[ comp_path.table_num - 1] is an id of ProAsmcomp.
comp_path.comp_id_table[comp_path.table_num - 2]used in ProAsmcomppathMdlGet, or comp_path.owner in case ofa short path,is an owner of ProAsmcomp.
Feliks.
In Reply to Eike Petersen:
Hi Patrick,
I think the component parameter is a feature parameter. Because the component is a feature type. So you need to get the feature link to that kind.
pro_error_fpar = ProSolidFeatVisit((ProSolid)mdl, (ProFeatureVisitAction)deleteKEParameterVisitAction, NULL, NULL);
ProError deleteKEParameterVisitAction(ProFeature * p_feature, ProError perr, ProAppData pad) {
ProParameterVisit(p_feature, NULL, deleteModelParameterVisitAction, pad);
return PRO_TK_NO_ERROR;
}There you should find the parameters. Be sure to check if the feature is from type component feature.
Best regards,
Eike
Aunt Edit: I checked these only in WF 4.0 and Creo 2.0 and think that it should work in WF5.0 too.