The following methods provide access and modify the properties of an annotation element.
Note
The methods in this section are shortcuts to redefining the feature containing the annotation elements. Because of this, Creo Parametric must regenerate the model after making the indicated changes to the annotation element. The methods include a flag to optionally
allow the Fix Model User Interface to appear upon a regeneration failure.
Methods Introduced:
The method wfcAnnotation::GetAnnotationElement retrieves the annotation element that contains the annotation as a wfcAnnotationElement object.
The method wfcAnnotationElement::GetAnnotationType returns the type of the annotation contained in the annotation element using the enumerated data type wfcAnnotationType. The valid values are:
|
• |
wfcANNOTATION_NOTE—Specifies a note. |
|
• |
wfcANNOTATION_GTOL—Specifies a geometric tolerance. |
|
• |
wfcANNOTATION_SURFACE_FINISH—Specifies a surface finish. |
|
• |
wfcANNOTATION_SYMBOL_INSTANCE—Specifies a symbol. |
|
• |
wfcANNOTATION_DIMENSION—Specifies a driven dimension. |
|
• |
wfcANNOTATION_REF_DIMENSION—Specifies a reference dimension. |
|
• |
wfcANNOTATION_SET_DATUM_TAG—Specifies a set datum tag. |
The method wfcAnnotationElement::IsReadOnly checks if the annotation element has read only or full access.
The method wfcAnnotationElement::HasMissingReferences checks if an annotation element has missing references. Use the input parameters of this method to investigate specific types
and sources of references, or to check all references simultaneously. The input arguments are:
|
• |
ReferenceType—Specifies the type of reference by using the enumerated data type wfcAnnotationRefFilter. The valid values are:
|
○
|
wfcANNOTATION_REF_ALL—Specifies all references. |
|
○
|
wfcANNOTATION_REF_WEAK—Specifies weak references. |
|
○
|
wfcANNOTATION_REF_STRONG—Specifies strong references. |
|
|
• |
ReferenceSource—Specifies the source of the references by using the enumerated data type wfcAnnotationRefFromType. The valid values are:
|
○
|
wfcANNOT_REF_FROM_ALL—Specifies all references. |
|
○
|
wfcANNOT_REF_FROM_ANNOTATION—Specifies references from annotations. |
|
○
|
wfcANNOT_REF_FROM_USER—Specifies references from users. |
|
|
• |
AtLeastOneMissingRef—Specifies if the annotation element has at least one missing reference of the specified type and source. |
Use the method wfcAnnotationElement::IsIncomplete returns a true value if the annotation element is incomplete because of missing strong references.
The method wfcAnnotationElement::GetCopyFlag retrieves the copy flag of the annotation elements. This property is not supported for elements in data sharing features.
It returns true if the annotation element contains copies of its references.
The method wfcWSelection::SetCopyFlagInAnnotationElement sets the copy flag of the annotation element. Set the input argument InvokeUI to true to allow the Fix Model User Interface to appear upon a regeneration failure. This property is not supported for annotations in data sharing features.
The method wfcAnnotationElement::IsDependent retrieves the value of the dependency flag for the annotation element. This property is supported only for the elements in
data sharing features. It returns true if the annotation element is dependent on its parent.
The method wfcWSelection::SetDependencyFlag sets the dependency flag of the annotation element. This property is supported only for annotations in data sharing features.
The method wfcAnnotationElement::GetAnnotation returns the annotation contained in an annotation element.
The method wfcAnnotationElement::GetAnnotationFeature returns the feature that owns the annotation element as a pfcFeature object.
The method wfcAnnotationElement::IsReferenceStrong identifies if a reference is weak or strong in a given annotation element.
The method wfcAnnotationElement::CollectAnnotationReferences retrieves an array of references contained in the specified annotation element as a wfcAnnotationReferences object. The input arguments are:
|
• |
RefStrength—Specifies the type of reference by using the enumerated data type wfcAnnotationRefFilter. |
|
• |
RefSource—Specifies the source of the references by using the enumerated data type wfcAnnotationRefFromType. |
The method wfcAnnotationElement::CollectQuiltReferenceSurfaces returns the surfaces which make up a quilt surface collection reference for the annotation element as a wfcAnnotationReferences object.
Note
All the surfaces made inactive by features occurring after the annotation element in the model regeneration are also returned.
The method wfcAnnotationElement::GetAnnotationReferenceDescription retrieves the description property for a given annotation element reference.
Note
The description string is the same as that of the tooltip text for the reference name in the Annotation Feature UI.
The method wfcAnnotationReference::GetAnnotationReferenceType retrieves the type of the annotation reference by using the enumerated data type wfcAnnotationRefType. The valid values are:
|
• |
wfcANNOT_REF_SINGLE—Specifies a single reference. |
|
• |
wfcANNOT_REF_CRV_COLLECTION—Specifies the collection of curves. |
|
• |
wfcANNOT_REF_SRF_COLLECTION—Specifies the collection of surfaces. |
The method wfcAnnotationElement::SetAnnotationReferenceDescription sets the description property for a given annotation element reference. The input arguments are:
|
• |
Reference—Specifies the annotation reference as a wfcAnnotationReference object. |
|
• |
Description—Specifies the description for the annotation element reference. |
Note
Creo Parametric must regenerate the model after making the indicated changes to the annotation element.
Use the method wfcWSelection::SetAnnotationInAnnotationElement to modify the annotation contained in an annotation element. Pass the input argument Annotation as NULL to modify the annotation element to be a non-graphical annotation.
Note
The above method does not support Datum Target Annotation Elements (DTAEs).
If you modify the annotation contained in the annotation element, the original annotation is automatically removed from the
element and is owned by the model.
The methods wfcWSelection::GetAutoPropagateFlagInAnnotationElement and wfcWSelection::SetAutoPropagateFlagInAnnotationElement get and set the autopropagate flag of the specified annotation element reference.
The method wfcWSelection::AddAnnotationReferenceInAnnotationElement adds a strong user-defined reference to the annotation element.
The method wfcWSelection::SetAnnotationReferencesInAnnotationElement replaces all the user-defined references in the annotation element with references that are specified in the input argument
Reference.
The method wfcWSelection::RemoveAnnotationReferenceInAnnotationElement removes the user-defined reference from the annotation element.
The method wfcWSelection::StrengthenAnnotationElementReference converts a weak reference to a strong reference.
The method wfcWSelection::WeakenAnnotationElementReference converts a strong reference to a weak reference.
The method wfcAnnotationReferenceCurveCollectionObject::Create creates a curve collection object for the specified user-defined annotation references.
The methods wfcAnnotationReferenceCurveCollectionObject::GetCurveCollection and wfcAnnotationReferenceCurveCollectionObject::SetCurveCollection retrieves and sets the curve collections for the user-defined set of annotation references using the wfcCollection object.
The method wfcAnnotationReferenceSelectionObject::Create creates a selection object for the specified user-defined annotation references.
The methods wfcAnnotationReferenceSelectionObject::GetReference and wfcAnnotationReferenceSelectionObject::SetReference retrieves and sets the references for the user-defined annotation references using the pfcSelection object.
The method wfcAnnotationReferenceSurfaceCollectionObject::Create creates a surface collection object for the specified user-defined annotation references.
The methods wfcAnnotationReferenceSurfaceCollectionObject::GetSurfaceCollection and wfcAnnotationReferenceSurfaceCollectionObject::SetSurfaceCollection retrieves and sets the surface collections for the user-defined annotation references using the wfcCollection object.