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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to get components with failed constrain in Assembly?

milind.badgujar
1-Newbie

How to get components with failed constrain in Assembly?

I am working in Creo 2.0 M080.Using ProToolkit API I would like to know if assembly has any component
with unresolved/failed constraint. Unresolved constrain for component could be due to external/internal reference are not available.Such part does generate a Regenerate failures.


So is there any API using which I can determine if given component has unresolved/failed constrain. I did tried API's which give states as packaged , under constrained , placed , unplaced but it didn't helped to get the correct results.


Thanks,


Milind


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 Milind


If you have that it should give you an regeneration failure I think. So you could rework the complete assembly tree and make a regenerate (do it more than once if failed so you sure it should work but doesn't). First over all components (prt) after that over the assemblies and you know if regeneration of the parts are possible and can show that as a result if, or if not all parts are regenerate able. If not you could show the part that isn't.


So after that it's not sure that all your parts are not regenerate able because of constraints, but you are sure that you need to look on the specified parts / assemblies.


Else you can use ProMdlDependenciesList so you get out an list for every model and can check if the dependencies are available or not with ProMdlRetrieve or something like that.



Best regards,
Eike

Hi all,


Milind,


There are a number of SPR's on the subject.Look forresolve mode, regen, frozen reference key words.


As Eike suggested, you could try a brutal attack approach if your process time allows. During regeneration set RESOLVE and CAN_FIX flags. Another approach is tovisit PRO_COMPONENT features, while getting their element trees and extracting constraint references (ProReference), orgeting constraints viaProAsmconstraint group of functions,could allow to use ProReferenceDiagnosticGet but the function does not always returns reliable results.


Feliks.

In Reply to Eike Petersen:



Hi Milind


If you have that it should give you an regeneration failure I think. So you could rework the complete assembly tree and make a regenerate (do it more than once if failed so you sure it should work but doesn't). First over all components (prt) after that over the assemblies and you know if regeneration of the parts are possible and can show that as a result if, or if not all parts are regenerate able. If not you could show the part that isn't.


So after that it's not sure that all your parts are not regenerate able because of constraints, but you are sure that you need to look on the specified parts / assemblies.


Else you can use ProMdlDependenciesList so you get out an list for every model and can check if the dependencies are available or not with ProMdlRetrieve or something like that.



Best regards,
Eike


Thanks for you reply.


Seems there is no direct API or workaround to get reliable information. I will try out all suggested workarounds.


Thanks Again !!!

Top Tags