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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Assembly to Component Link Attribute

pwilliams-3
11-Garnet

Assembly to Component Link Attribute

WF 5.0 M200

In WF I am able to create a parameter/attribute on the relationship/link between an assembly and it's component. I know this new attribute is not on the component itself (see below screenshots). In both cases below, I selected the same part/component in the assembly.

[cid:image001.jpg@01CF0D4A.4ABBDB00] [cid:image002.jpg@01CF0D4A.4ABBDB00]
How can I get access to this component parameter in Pro/TOOLKIT? What modelitem do I need to acquire so I can get the parameters?

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image003.jpg@01CF0D4A.4ABBDB00]


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

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.

FV
17-Peridot
17-Peridot
(To:pwilliams-3)

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.


Yes I am very familiar with assembly traversal, I have just not ever encountered an attribute on the component relationship between the parent and the child. You are all confirming the same thing so thank you all very much. See you in Boston!

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CF0DFE.23DB42A0]
Announcements


Top Tags