Functions Introduced:
As described earlier, the function ProSolidFeatVisit() finds all the features belonging to a part or an assembly. The feature inquiry functions provide more information about a
particular feature.
The function ProFeatureTypeGet() provides the type of the feature. This feature type uses the data type ProFeattype, which is really an integer that takes defined values such as the following:
See the include file ProFeatType.h for the list of defined values.
The function ProFeatureTypenameGet() returns the name of the feature type. Given a ProFeature pointer to a specific feature, this function returns the name of the feature type, for example, CHAMFER, DATUM, COORDINATE SYSTEM, and so on. Arguments to this function must not be NULL.
The function ProFeatureSubtypeGet() provides the subtype (such as sheet metal) of a specified feature. Note that not all features support subtypes. This is like
viewing valid model subtypes by opening the Model Tree settings command in Creo Parametric. Click menu and then select Feat Subtype in the Model Tree Columns dialog box, as an additional display column.
The function ProFeatureStatusGet() classifies the feature according to the following status values:
|
• |
PRO_FEAT_ACTIVE—An ordinary feature. |
|
• |
PRO_FEAT_SUPPRESSED—A suppressed feature. |
|
• |
PRO_FEAT_FAMTAB_SUPPRESSED—A feature suppressed due to the family table settings. |
|
• |
PRO_FEAT_SIMP_REP_SUPPRESSED—A feature suppressed due to the simplified representation. |
|
• |
PRO_FEAT_PROG_SUPPRESSED—A feature suppressed due to Pro/PROGRAM. |
|
• |
PRO_FEAT_INACTIVE—A feature that is not suppressed, but is not currently in use for reasons other than the ones identified above. |
|
• |
PRO_FEAT_UNREGENERATED—A feature that has not yet been regenerated. This is due to a regeneration failure or if the status is obtained during the
regeneration process. |
|
• |
PRO_FEAT_INVALID—The feature status could not be retrieved. |
The function ProFeatureStatusflagsGet() retrieves the bitmask containing one or more of the following feature status bit flags for a specified feature:
|
• |
PRO_FEAT_STAT_INVALID—Specifies an invalid feature. |
|
• |
PRO_FEAT_STAT_INACTIVE—Specifies an inactive feature. If the bit flag is set to 0, then it means an active feature. |
|
• |
PRO_FEAT_STAT_ACTIVE—Specifies an active feature. |
|
• |
PRO_FEAT_STAT_FAMTAB_SUPPRESSED—Specifies a feature suppressed due to the family table settings. |
|
• |
PRO_FEAT_STAT_SIMP_REP_SUPPRESSED—Specifies a feature suppressed due to the simplified representation. |
|
• |
PRO_FEAT_STAT_PROG_SUPPRESSED—Specifies a feature suppressed due to Pro/PROGRAM. |
|
• |
PRO_FEAT_STAT_SUPPRESSED—Specifies a suppressed feature. |
|
• |
PRO_FEAT_STAT_UNREGENERATED—Specifies an active feature that has not yet been regenerated. This is due to a regeneration failure or if the status is
obtained during the regeneration process. |
|
• |
PRO_FEAT_STAT_FAILED—Specifies a failed feature. |
|
• |
PRO_FEAT_STAT_CHILD_OF_FAILED—Specifies a child of a failed feature. |
|
• |
PRO_FEAT_STAT_CHILD_OF_EXT_FAILED—Specifies a child of an external failed feature. |
The function ProFeatureIsIncomplete() tells you whether a specified feature is incomplete. An incomplete feature is one that has been created by using ProFeatureCreate() from a Creo Parametric TOOLKIT application, but which does not yet contain all the necessary feature elements to allow regeneration.
The function ProFeatureIsNcseq() determines whether a feature is an Creo NC sequence.
The ProFeatureSolidGet() function provides the identifier of the solid that owns the specified feature.
The ProFeatureChildrenGet() and ProFeatureParentsGet() functions get the children and parents of the specified feature. For these functions, the parent of a feature means a feature
it directly depends on, and a child is a feature that directly depends on it. This differs from the Creo Parametric command , which also shows indirect dependencies.
The function ProFeatureSelectionGet() is used for features that were created in a part as a result of a feature in a parent assembly. For example, if you create
a hole in Assembly mode, then select a part to be intersected by that hole, the geometry of the hole is visible to Creo Parametric TOOLKIT as belonging to the part, even if the original feature is specified as being visible at the assembly level. This geometry—a
list of the surfaces forming the hole—belongs to a feature in the part whose type is PRO_FEAT_ASSEM_CUT. The function ProFeatureSelectionGet(), when applied to that part feature, identifies the assembly, and the path down through it to the part in question, which
contains the original feature.
During regeneration, Creo Parametric performs geometry checking to prevent regeneration errors. The geometry check process identifies features that could cause
problems if the part or assembly is modified, but which do not cause regeneration failure in the model in its present state.
The ProFeatureHasGeomchks() function outputs a variable of type ProBoolean that indicates whether a particular feature, identified as an input argument to the function, has geometry checks.
The function ProFeatureIsReadonly() provides information about the read status of the specified feature. Its first argument is a pointer to the feature’s (ProFeature) handle. If the feature is read only, the function outputs a ProBoolean with the value PRO_B_TRUE; otherwise, the value is PRO_B_FALSE.
The function ProFeatureIsEmbedded() identifies whether the feature is an embedded datum. Embedded features are visible in the model tree, but cannot be used
as reference parents for features other than the feature into which they are embedded.
To determine whether insert mode is active in a specified solid, use the function
ProInsertModeIsActive(). If activated, features are inserted into the feature list after the feature specified when
ProFeatureInsertModeActivate() was called. New features continue to be inserted until you call the function
ProInsertModeCancel(). See the section
Manipulating Features for more information about insert mode.
The function ProFeatureCopyinfoGet() returns information about a copied feature. The information includes the type of copy operation, dependency, source feature,
and additional features copied in the same operation. This function supersedes the Pro_copy_info structure returned by the Pro/Develop function prodb_feature_info().
The function ProFeatureZoneGet() returns the following parameters related to a feature zone:
|
• |
p_planes—ProArray of planes. |
|
• |
p_oper_arr—ProArray of operations; where 0 specifies intersection of half spaces and 1 specifies union of half spaces. Creo Parametric retains the material that belongs to the intersection or union of the half spaces of the planes. |
The function
ProFeatureZonesectionCreate() creates a zone feature handle using reference planes and operations. The input arguments are as follows:
|
• |
p_solid—A handle to the model.
|
|
• |
zone_refs—An array of zone reference planes of type ProZoneReference. The structure ProZoneReference contains the geometric ID of the reference zone plane, the value for the operation, that is, 0 or 1 and the member ID of the part to which the reference plane belongs to. Pass NULL to memb_id_tab if the feature is owned by the part on which the zone is being created.
Creo Parametric retains the material that belongs to the intersection or union of the half spaces of the reference planes.
|
|
• |
zone_name—The name of the zone feature handle. If a zone with the specified name exists, then the function returns the error PRO_TK_E_FOUND and the zone is not created.
|
The function
ProFeatureZonesectionGet() returns the zone references for the specified feature. The output argument
p_zone_refs contains an array of planes of type
ProZoneReferenceWithflip. The structure
ProZoneReferenceWithflip contains:
|
• |
The geometric ID of the reference zone plane. |
|
• |
The value for the operation, where 0 specifies intersection of half spaces that is, the AND operator and 1 specifies union of half spaces that is, the OR operator. |
|
• |
The member ID of the part to which the reference plane belongs. |
|
• |
The side of the plane where the model is kept. 1 indicates positive normal of the plane and –1 indicates the opposite side. |
Use the function ProZoneReferenceFree() to free the memory allocated to the zone reference data.
Use the function ProZoneReferenceArrayFree() to free the ProArray of zone reference data.
The function ProFeatureZonesectionWithflipCreate() creates a zone feature using reference planes and operations. This function allows you to flip the direction of zone planes
while creating the zone feature.
The function ProFeatureZoneXsecgeomGet() creates an array of cross section geometry of type ProXsecGeometry for each zone plane. It returns an array of these arrays in the specified zone feature. Use the function ProFeatureZoneXsecGeomArrayFree() to free the memory allocated for the ProArray of ProArrays of type ProXsecGeometry.
The function ProModelitemIsZone() checks if the specified model item is a zone feature. Specify the handle to the model item as the input argument of this
function.
Use the function ProFeatureIsInFooter() to check if the specified feature is currently located in the model tree footer. The footer is a section of the model tree
that lists certain types of features such as, component interfaces, annotation features, zones, reference features, publish
geometry, and analysis feature. The features in the footer are always regenerated at the end of the feature list. You can
move features, such as, reference features, annotation features, and so on, to the footer. Some features, such as, component
interfaces, zones, and so on, are automatically placed in the footer. Refer to the Creo Parametric online Help for more information
on footer. Refer to the Creo Parametric online Help for more information on footer.
Use the function ProFeatureToFooterMove() to move the specified feature into the model tree footer.
Use the function ProFeatureFromFooterMove() to move the specified feature out of the model tree footer.
Some features behave like components because they have some properties that are similar to those of components. These features
have some association with a solid model and are interpreted as placed components. When a component is placed it means it
has been explicitly positioned at some location in the assembly. Examples of such features are solid welds, physical sensors,
and so on. Solid welds organize their geometry as a special internal solid model, which gives them component-like characteristics.
Similarly, physical sensors represent actual hardware that is placed on the model to measure parameters. Use the function
ProFeatureIsComponentLike() to identify components and other features that behave like components. Refer to the
section Assembly: Basic Assembly Access for more information on placed components.