Manipulating Features
Functions Introduced:
The functions
ProFeatureDelete() and
ProFeatureSuppress() act like the right-mouse button commands
Delete and
Suppress, except they do not repaint the window. You can process many features in a single call using an input of type
ProFeatlist. Each of these functions takes an array of options as the input that indicates whether to also delete or suppress features dependent on those being acted on directly. The options used while deleting or suppressing features are as follows:
• PRO_FEAT_DELETE_NO_OPTS—Delete or suppress the features without deleting or suppressing their dependent children features. This may result in regeneration failures. Use the option PRO_FEAT_DELETE_FIX, or one of the CLIP options to fix these failures.
• PRO_FEAT_DELETE_CLIP—Delete or suppress the features along with their dependent children features.
• PRO_FEAT_DELETE_FIX—Delete or suppress the features without deleting or suppressing their dependent children features. The fix model user interface will be prompted in case of a regeneration failure. This option must be used only in the Resolve mode. Otherwise, the function returns PRO_TK_BAD_CONTEXT.
• PRO_FEAT_DELETE_RELATION_DELETE—Delete relations with obsolete dimensions.
• PRO_FEAT_DELETE_RELATION_COMMENT—Change relations with obsolete dimensions into comments.
• PRO_FEAT_DELETE_CLIP_ALL—Delete or suppress the features along with all the following features.
• PRO_FEAT_DELETE_INDIV_GP_MEMBERS—Individually delete or suppress the features out of the groups to which they belong. If this option is not included, the entire group of features is deleted or suppressed. This option can be included only if the option PRO_FEAT_DELETE_CLIP is also included.
• PRO_FEAT_DELETE_CLIP_INDIV_GP_MEMBERS—Individually delete or suppress the children of features out of the group to which they belong. If this option is not included, the entire group containing the features and their children is deleted or suppressed. This option can be included only if the options PRO_FEAT_DELETE_CLIP and PRO_FEAT_DELETE_INDIV_GP_MEMBERS are also included.
• PRO_FEAT_DELETE_KEEP_EMBED_DATUMS—Retain the embedded datums stored in a feature while deleting the feature using
ProFeatureDelete(). If this option is not included, the embedded datums will be deleted along with the parent feature.
The function
ProFeatureRedefine() is equivalent to the command
Feature>
Redefine. Additionally, it can redefine an existing feature with the new element tree. The data passed in through the new element tree replaces the existing data in the feature.
provides access to the feature insert mode functionality with the
ProFeatureInsertModeActivate() and
ProInsertModeCancel() functions. The function
ProFeatureInsertModeActivate() takes a single argument—the handle to the feature after which new features are to be inserted. This feature becomes the last feature in the feature regeneration list. All features that had appeared after that feature are temporarily suppressed. New features are added after the (new) last feature. Feature insertion continues until insert mode is terminated with a call to
ProInsertModeCancel(). Its first argument is a handle to the solid, and the second is a
ProBoolean that enables you to specify whether suppressed features are to be resumed.
The function
ProFeatureReadonlySet() assigns a read-only status to model features. Its only argument is a
ProFeature handle that specifies the last feature in the feature list to be designated as read only. All preceding features are read only; all features following this feature have standard access. From
3.0 onward, the features that are made read-only appear under a separate container node at the top of the model tree. The node has its label as
Read Only Features and also has a padlock glyph associated with it.
The function
ProFeatureReadonlyUnset() removes the read-only status from all features in the specified solid. From
3.0 onward, the container node
Read Only Features is dismissed from the model tree when the read-only status is removed.
The function
ProFeatureReorder() enables you to change the position of one or more features in the feature regeneration sequence. Its input arguments are as follows:
• ProSolid solid—The handle to the solid owner of the features.
• int *feat_ids—An array of feature identifiers that specifies the features to be reordered. The array should contain features that formed a contiguous sublist within the original feature regeneration list. If reordering a group, all the features in the group including the Group Header feature must be included in this array.
• intn_feats—The number of features to reorder.
• intnew_feat_num—An integer that indicates the intended location of the first feature in the specified set after reorder. This integer is not the feature identifier, but rather the regeneration sequence number of the feature. You obtain this number by calling the function
ProFeatureNumberGet().
Use the function
ProSolidFeatstatusGet() to get the current sequence and statuses. You must use care when you change the sequence of features. Unless you have advance knowledge of the relationship between the features you are reordering, you should use the functions
ProFeatureParentsGet() and
ProFeatureChildrenGet() before changing the feature order to ensure that no feature is reordered to be before its parent features.