I am having some issues with the ProFeatureWithOptionsResume Toolkit function in Creo 3 (M110). I am using this function with the PRO_FEAT_RESUME_INCLUDE_PARENTS option so that it will resume any suppressed parents. In some situations, this function is locking up Creo with a fatal error. I have not figured out why, but when I change the option to PRO_FEAT_RESUME_NO_OPTS, it no longer locks up Creo, but it returns PRO_TK_SUPP_PARENTS and does not resume the feature.
I have tried using the deprecated ProFeatureResume function, and it performs the same as ProFeatureWithOptionsResume when using PRO_FEAT_RESUME_NO_OPTS.
I have also created a function to try and recursively resume a feature and any suppressed parents, but when I use that on the feature in question, none of its parent features are suppressed according to ProFeatureStatusGet.
Can anyone guide me to figuring out why the resume function is locking up Creo when using the option to include suppressed parents?
Can anyone help me overcome this issue?
Update - after further examining the feature in question. The feature I am resuming requires a redefinition to properly regenerate. That's probably what the root cause of all of this is, but changing the regeneration option in ProFeatureWithOptionsResume to PRO_REGEN_CAN_FIX doesn't change anything. Why won't this option allow the user to fix the regeneration failure? Why does the resume function crash Creo when the feature fails to regenerate? Why does the resume function indicate there are suppressed parents when that is not the case?
P.S. - Attached is my recursive function that I'm trying to use to resume a feature and all of its suppressed parents.
Message was edited by: Corey Van Sickle
You'll need to build an array of feature id's which you would want to resume. Creating one member array and passing it to ProFeatureWithOptionsResume function is not going to work. For flags I would do something like this : PRO_REGEN_FORCE_REGEN | PRO_REGEN_RESOLVE_MODE | PRO_REGEN_CAN_FIX.
Well, I only have one feature to resume, so the array will only have one member. Why wouldn't a one member array work?
We have our configs set to always use resolve mode.
The code you had attached shows multiple calls to ProFeatureWithOptionsResume() ...
In my experience, you'll need to build a ProArray() of feature id's to be resumed and pass it to 'resume' function.
Yes that's the entire point of the function. Using ProFeatureWithoptionsResume to resume a feature that fails regeneration crashes Creo when used with PRO_FEAT_RESUME_INCLUDE_PARENTS. This function is to try to eliminate the need to use the option to include parents (because it crashes Creo).
This way, if a ProFeatureWithoptionsResume returns PRO_TK_SUPP_PARENTS, it can locate any suppressed parents and resume them. This does not crash Creo.
The actual problem here is that ProFeatureWithoptionsResume does not work at all when the feature being resumed will fail regeneration. It crashes Creo when using PRO_FEAT_RESUME_INCLUDE_PARENTS and always returns PRO_TK_SUPP_PARENTS when not, but there are no suppressed parents of the feature I am resuming. This function should allow the user to fix the regeneration failure when resuming the feature, especially when using resolve mode and PRO_REGEN_CAN_FIX.
Please take a look at the video clip - the link is at the bottom...