Accessing Annotations
Methods Introduced:
wfcWDrawing.WDrawing.EraseAnnotation
The method wfcAnnotation.Annotation.ShowInDrawing shows the annotation in the current combined state. The annotation will be visible until it is explicitly erased from the combined state. The method also adds the specified annotation to the current combined state, if it has not been added. If the specified annotation has been erased, then the method changes the display status of the erased annotation and makes it visible in the combined state, that is, it unerases the annotation. This function is also capable of showing an annotation in a drawing view similar to the Creo Parametric command Show and Erase. The input arguments are:
DrawingView—Specifies the drawing view.
CompPath—Specifies the assembly component path.
The methods wfcAnnotation.Annotation.Display and wfcAnnotation.Annotation.Undisplay temporarily display and remove an annotation from the display for the specified combined state .
Similarly, the methods wfcAnnotation.Annotation.DisplayInDrawing and wfcAnnotation.Annotation.UndisplayInDrawing temporarily display and remove an annotation from the display for the specified drawing. Specify the drawing in the input argument DrawingModel The undisplay and display methods for combined state and drawing should be used together. To edit a shown annotation, it must be first removed temporarily from display by using the undisplay method, followed by editing the annotation. The annotation must be redisplayed using the display method, so that the updated annotation is visible to the user.
The method wfcAnnotation.Annotation.Update updates the display of an annotation, but does not actually display it. If the annotation is not currently displayed because it is hidden by layer status or inactive geometry, the text extracted from the annotation may include callout symbols, instead of the text shown to the user. The method wfcAnnotation.Annotation.Update informs Creo Parametric to update the contents of the annotation in order to cross-reference these callout values. This method supports 3D model notes and detail notes.
The method wfcAnnotation.Annotation.IsInactive indicates whether the annotation can be shown or not. An annotation becomes inactive if all the weak references it points to have been lost or consumed.
The method wfcAnnotation.Annotation.IsUsingXSecReference identifies if the annotation is created on or attached to a cross-sectional edge.
The method wfcWDrawing.WDrawing.EraseAnnotation removes an annotation from the display for the specified drawing. The annotation is not shown in the specified drawing.
* 
The annotation which was removed from the display using the method wfcWDrawing.WDrawing.EraseAnnotation will become visible again, only if the method wfcAnnotation.Annotation.ShowInDrawing is called to explicitly display the annotation.
The method wfcSelect.WSelection.ShowAnnotations displays the annotation of the specified type for the selected feature or component.
The method wfcSelect.WSelection.ShowAxes displays the axes for the selected feature and component.
The method wfcSelect.WSelection.ShowDatumTargets displays the datum targets for the selected feature and component.
* 
In case of methods wfcSelect.WSelection.ShowAnnotations, wfcSelect.WSelection.ShowAxes, and wfcSelect.WSelection.ShowDatumTargets, for annotations created in drawing mode and owned by a solid, which can be displayed only in the context of that drawing, specify the name of the drawing in the input argument drawing. You can specify the view in which the annotations for the selected feature and component must be displayed. If you pass the input argument DrawingView as NULL, the annotations are displayed in all the views.
The method wfcView2D.WView2D.ShowAnnotations displays the annotation of the specified type in the drawing view by using the enumerated data type wfcAnnotation.AnnotationType.
The method wfcView2D.WView2D.ShowAxes displays the axes in the drawing view.
The method wfcView2D.WView2D.ShowDatumTargets displays the datum targets in the drawing view.
Was this helpful?