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.
• 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.
• FromFeat—Not currently used. This parameter is reserved for future use.
• 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.
• 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.
• 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.
• UpdateInstances—Updates the instances of the solid model in memory. This may slow down the regeneration process. By default, this attribute is false.
• 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.
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:
|
|
The NoResolveMode and ResolveMode temporarily override the default settings, which control the regeneration behavior in a model.
|
|
|
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.
|
|
|
The AllowConfirm and UndoIfFail cannot be used together and are applicable only when the input parameter is NoResolveMode in a model.
|
The method
wfcWRegenInstructions::Create creates instructions for regenerating a model.