User's Guide > Solid > Regenerating a Solid
Regenerating a Solid
Methods Introduced:
The method pfcSolid::Regenerate causes the solid model to regenerate according to the instructions provided in the form of the pfcRegenInstructions object. Passing a null value for the instructions argument causes an automatic regeneration.
In the No-Resolve mode, if a model and feature regeneration fails, failed features and children of failed features are created and regeneration of other features continues. However, Creo Object TOOLKIT C++ does not support regeneration in this mode. The method pfcSolid::Regenerate throws an exception pfcXToolkitBadContext, if Creo+ is running in the No-Resolve mode. To switch back to the Pro/ENGINEER Wildfire 4.0 behavior in the Resolve mode, set the configuration option regen_failure_handling to resolve_mode in the Creo+ session.
* 
Setting the configuration option to switch to Resolve mode ensures the old behavior as long as you do not retrieve the models saved under the No-Resolve mode. To consistently preserve the old behavior, use Resolve mode from the beginning and throughout your Creo+ session.
The pfcRegenInstructions object contains the following input parameters:
AllowFixUI—Determines whether or not to activate the Fix Model user interface, if there is an error.
Use the method pfcRegenInstructions::SetAllowFixUI to modify this parameter.
ForceRegen—Forces the solid model to fully regenerate. All the features in the model are regenerated. If this parameter is false, Creo determines which features to regenerate. By default, it is false.
Use the method pfcRegenInstructions::SetForceRegen to modify this parameter.
FromFeat—Not currently used. This parameter is reserved for future use.
Use the method pfcRegenInstructions::SetFromFeat to modify this parameter.
RefreshModelTree—Refreshes the Creo model tree after regeneration. The model must be active to use this attribute. If this attribute is false, the model tree is not refreshed. By default, it is false.
Use the method pfcRegenInstructions::SetRefreshModelTree to modify this parameter.
ResumeExcludedComponents—Enables Creo to resume the available excluded components of the simplified representation during regeneration. This results in a more accurate update of the simplified representation.
Use the method pfcRegenInstructions::SetResumeExcludedComponents to modify this parameter.
UpdateAssemblyOnly—Updates the placements of an assembly and all its sub-assemblies, and regenerates the assembly features and intersected parts. If the affected assembly is retrieved as a simplified representation, then the locations of the components are updated. If this attribute is false, the component locations are not updated, even if the simplified representation is retrieved. By default, it is false.
Use the method pfcRegenInstructions::SetUpdateAssemblyOnly to modify this parameter.
UpdateInstances—Updates the instances of the solid model in memory. This may slow down the regeneration process. By default, this attribute is false.
Use the method pfcRegenInstructions::SetUpdateInstances to modify this parameter.
ResolveModeRegen—Allows regeneration of a solid in resolve mode. The regeneration behavior is controlled by temporarily overriding the default settings.
Use the method pfcRegenInstructions::SetResolveModeRegen to modify this parameter. By default, it is false. If you want to set your Creo+ application in resolve mode, you need to set the value of this parameter to true.
* 
However, resolve mode will be deprecated in a future release of Creo+. Hence, it is recommended to run the application without calling the method pfcRegenInstructions::SetResolveModeRegen.
The method wfcWSolid::WRegenerate regenerates the model according to the regeneration instructions provided in the form of the wfcRegenInstructions object. The wfcRegenInstructions object contains the following input parameters:
NoResolveMode—Gets and sets the no resolve mode in a model using the methods wfcWRegenInstructions::GetNoResolveMode and wfcWRegenInstructions::SetNoResolveMode
ResolveMode—Gets and sets the resolve mode in a model using the methods wfcWRegenInstructions::GetResolveMode and wfcWRegenInstructions::SetResolveMode
* 
The NoResolveMode and ResolveMode temporarily override the default settings, which control the regeneration behavior in a model.
AllowConfirm—This parameter has been deprecated from Creo+ 4.0 M030. Gets and sets the state of regeneration failure window in a model using the methods wfcWRegenInstructions::GetAllowConfirm and wfcWRegenInstructions::SetAllowConfirm
* 
The interactive dialog box which provided an option to retain failed features and children of failed features, if regeneration fails is no longer supported. Creo+ displays a warning message which gives details of failed features.
UndoIfFail—If possible, gets and sets the undo mode if the regeneration of the model fails using the methods wfcWRegenInstructions::GetUndoIfFail and wfcWRegenInstructions::SetUndoIfFail
* 
The AllowConfirm and UndoIfFail cannot be used together and are applicable only when the input parameter is NoResolveMode in a model.
TopAsmOnly—Forces only top level assembly to regenerate using the methods wfcWRegenInstructions::GetTopAsmOnly and wfcWRegenInstructions::SetTopAsmOnly. All the other models follow standard regeneration rules.
The method wfcWRegenInstructions::Create creates instructions for regenerating a model.
Was this helpful?