Overview
These functions traverse STEP properties on products or other definitions. Properties are attached using a property_definition, which can give a name to the property. The value is given by a property_definition_representation, which connects the property definition to a representation that contains measures, geometry, or other representation items. These functions are defined by the stix_property.h header file.
The stix_property_tag() function adds backpointers to properties and their representations so that you can find them quickly. The stix_property_get_owner() and stix_property_get_owner_as_pdef() functions simplify working with properties.
stix_property_get_owner()
RoseObject * stix_property_get_owner ( stp_property_definition * pd ); RoseObject * stix_property_get_owner ( stp_property_definition_representation * pdr );
The stix_property_get_owner() function extracts the value from the "definition" select field in a property definitions. The return value is cast to a general RoseObject pointer because the definition field can accommodate a range of different types. Use the stix_property_get_owner_as_pdef() function if you expect the value to be a product_definition.
The property_definition_representation version of the function will follow the reference to a property_definition if present and return its owner, otherwise it just returns the contents of the PDR's "definition" field.
stix_property_get_owner_as_pdef()
stp_product_definition * stix_property_get_owner_as_pdef ( stp_property_definition * pd ); stp_product_definition * stix_property_get_owner_as_pdef ( stp_property_definition_representation * pdr );
The stix_property_get_owner_as_pdef() function is a wrapper around stix_property_get_owner() that only returns values of type product_definition. If the owner is some other type, the function will return null.
stix_property_get_shape()
stp_product_definition_shape * stix_property_get_shape ( RoseObject * obj );
The stix_property_get_shape() function searches for a product_definition_shape property on an object. This function expects the properties to have been previously indexed with the stix_property_tag() function. It will return null if the properties have not been tagged.
stix_property_has()
int stix_property_has (RoseObject * obj);
The stix_property_has() function returns true if an object has associated properties. This function expects the properties to have been previously indexed with the stix_property_tag() function. It will return null if the properties have not been tagged.
stix_property_tag()
// add property index void stix_property_tag( RoseDesign * d ); // remove property index void stix_property_untag( RoseDesign * d ); // untag+tag to refresh property index void stix_property_retag( RoseDesign * d );
The stix_property_tag() function adds quick access information things referenced by property_definition and property_definition_representation objects. The backpointers are held in StixMgrProperty and StixMgrPropertyRep manager objects. These classes can be used if fine-grained access is desired.
You must call stix_present_tag() before using these
presentation functions. The tag
function checks if the
index data is present and builds it if not present. Subsequent calls
are ignored. The untag
function removes the index
data.
If the underlying STEP data has changed, use the retag
function to force a refresh. It simply removes the index
with untag
then builds it again
with tag
.