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:
|
|
wfcAnnotation.Annotation.GetAnnotationElementWithOption |
|
|
wfcAnnotation.AnnotationReferenceCurveCollectionObject_Create |
|
|
wfcAnnotation.AnnotationReferenceSelectionObject_Create |
|
|
wfcAnnotation.AnnotationReferenceSurfaceCollectionObject_Create |
The method wfcAnnotation.Annotation.GetAnnotationElement retrieves the annotation element that contains the annotation as a wfcAnnotationElement object.
The method wfcAnnotation.Annotation.GetAnnotationElementWithOption
The method wfcAnnotation.AnnotationElement.GetAnnotationType returns the type of the annotation contained in the annotation element using the enumerated data type wfcAnnotation.AnnotationType. The valid values are:
|
• |
ANNOTATION_NOTE—Specifies a note. |
|
• |
ANNOTATION_GTOL—Specifies a geometric tolerance. |
|
• |
ANNOTATION_SURFACE_FINISH—Specifies a surface finish. |
|
• |
ANNOTATION_SYMBOL_INSTANCE—Specifies a symbol. |
|
• |
ANNOTATION_DIMENSION—Specifies a driven dimension. |
|
• |
ANNOTATION_REF_DIMENSION—Specifies a reference dimension. |
|
• |
ANNOTATION_SET_DATUM_TAG—Specifies a set datum tag. |
The method wfcAnnotation.AnnotationElement.IsReadOnly checks if the annotation element has read only or full access.
The method wfcAnnotation.AnnotationElement.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 wfcAnnotation.AnnotationRefFilter. The valid values are:
|
○
|
ANNOTATION_REF_ALL—Specifies all references. |
|
○
|
ANNOTATION_REF_WEAK—Specifies weak references. |
|
○
|
ANNOTATION_REF_STRONG—Specifies strong references. |
|
|
• |
ReferenceSource—Specifies the source of the references by using the enumerated data type wfcAnnotation.AnnotationRefFromType. The valid values are:
|
○
|
ANNOT_REF_FROM_ALL—Specifies all references. |
|
○
|
ANNOT_REF_FROM_ANNOTATION—Specifies references from annotations. |
|
○
|
ANNOT_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 wfcAnnotation.AnnotationElement.IsIncomplete returns a true value if the annotation element is incomplete because of missing strong references.
The method wfcAnnotation.AnnotationElement.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 wfcSelect.WSelection.SetCopyFlagInAnnotationElement sets the copy flag of the annotation element. Set the input argumentInvokeUI to true to allow theFix Model User Interface to appear upon a regeneration failure. This property is not supported for annotations in data sharing features.
The method wfcAnnotation.AnnotationElement.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 wfcSelect.WSelection.SetDependencyFlag sets the dependency flag of the annotation element. This property is supported only for annotations in data sharing features.
The method wfcAnnotation.AnnotationElement.GetAnnotation returns the annotation contained in an annotation element.
The method wfcAnnotation.AnnotationElement.GetAnnotationFeature returns the feature that owns the annotation element as a pfcFeature.Feature object.
The method wfcAnnotation.AnnotationElement.IsReferenceStrong identifies if a reference is weak or strong in a given annotation element.
The method wfcAnnotation.AnnotationElement.CollectAnnotationReferences retrieves an array of references contained in the specified annotation element as a wfcAnnotation.AnnotationReferences object. The input arguments are:
|
• |
RefStrength—Specifies the type of reference by using the enumerated data type wfcAnnotation.AnnotationRefFilter. |
|
• |
RefSource—Specifies the source of the references by using the enumerated data type wfcAnnotation.AnnotationRefFromType. |
The method wfcAnnotation.AnnotationElement.CollectQuiltReferenceSurfaces returns the surfaces which make up a quilt surface collection reference for the annotation element as a wfcAnnotation.AnnotationReferences object.
Note
All the surfaces made inactive by features occurring after the annotation element in the model regeneration are also returned.
The method wfcAnnotation.AnnotationElement.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 wfcAnnotation.AnnotationReference.GetAnnotationReferenceType retrieves the type of the annotation reference by using the enumerated data type wfcAnnotation.AnnotationRefType. The valid values are:
|
• |
ANNOT_REF_SINGLE—Specifies a single reference. |
|
• |
ANNOT_REF_CRV_COLLECTION—Specifies the collection of curves. |
|
• |
ANNOT_REF_SRF_COLLECTION—Specifies the collection of surfaces. |
The method wfcAnnotation.AnnotationElement.SetAnnotationReferenceDescription sets the description property for a given annotation element reference. The input arguments are:
|
• |
Reference—Specifies the annotation reference as a wfcAnnotation.AnnotationReference 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 wfcSelect.WSelection.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 wfcSelect.WSelection.GetAutoPropagateFlagInAnnotationElement and wfcSelect.WSelection.SetAutoPropagateFlagInAnnotationElement get and set the autopropagate flag of the specified annotation element reference.
The method wfcSelect.WSelection.AddAnnotationReferenceInAnnotationElement adds a strong user-defined reference to the annotation element.
The method wfcSelect.WSelection.SetAnnotationReferencesInAnnotationElement replaces all the user-defined references in the annotation element with references that are specified in the input argument
Reference.
The method wfcSelect.WSelection.RemoveAnnotationReferenceInAnnotationElement removes the user-defined reference from the annotation element.
The method
wfcSelect.WSelection.SetAnnotationElementReferences sets user-defined annotation references in the specified annotation elements. The input arguments follow:
|
• |
Elements—Annotation Elements specified using the class wfcAnnotation.AnnotationElements. |
|
• |
References—User-defined references specified using the class wfcAnnotation.AnnotationReferenceSetsArray. |
|
• |
InvokeUI—Specify the Boolean value to indicate whether the UI is invoked. |
Use the method wfcAnnotation.wfcAnnotation.AnnotationReferenceSet_Create to create an instance of the wfcAnnotationReferenceSet object. The input arguments are as follows:
Use the methods wfcAnnotation.AnnotationReferenceSet.GetReference and wfcAnnotation.AnnotationReferenceSet.SetReference to get and set the user-defined annotation references using the wfcAnnotation.AnnotationReference object.
Use the methods wfcAnnotation.AnnotationReferenceSet.GetStrong and wfcAnnotation.AnnotationReferenceSet.SetStrong to get and set the strength of the user-defined annotation references.
Use the methods wfcAnnotation.AnnotationReferenceSet.GetDescription and wfcAnnotation.AnnotationReferenceSet.SetDescription to get and set the description of the user-defined annotation references.
Use the methods wfcAnnotation.AnnotationReferenceSet.GetAutoPropagate and wfcAnnotation.AnnotationReferenceSet.SetAutoPropagate to get and set auto propagate flag for the user-defined annotation features.
The method wfcSelect.WSelection.StrengthenAnnotationElementReference converts a weak reference to a strong reference.
The method wfcSelect.WSelection.WeakenAnnotationElementReference converts a strong reference to a weak reference.
The method wfcAnnotation.AnnotationReferenceCurveCollectionObject_Create creates a curve collection object for the specified user-defined annotation references.
The methods wfcAnnotation.AnnotationReferenceCurveCollectionObject.GetCurveCollection and wfcAnnotation.AnnotationReferenceCurveCollectionObject.SetCurveCollection retrieves and sets the curve collections for the user-defined set of annotation references using the wfcCollection.Collection object.
The method wfcAnnotation.AnnotationReferenceSelectionObject_Create creates a selection object for the specified user-defined annotation references.
The methods wfcAnnotation.AnnotationReferenceSelectionObject.GetReference and wfcAnnotation.AnnotationReferenceSelectionObject.SetReference retrieves and sets the references for the user-defined annotation references using the pfcSelect.Selection object.
The method wfcAnnotation.AnnotationReferenceSurfaceCollectionObject_Create creates a surface collection object for the specified user-defined annotation references.
The methods wfcAnnotation.AnnotationReferenceSurfaceCollectionObject.GetSurfaceCollection and wfcAnnotation.AnnotationReferenceSurfaceCollectionObject.SetSurfaceCollection retrieves and sets the surface collections for the user-defined annotation references using the wfcCollection.Collection object.