English

How To: Get a text string from an Annotation object ? [SCRIPT]

Procedure

Summary
ArcView 3.x introduced a new Annotation() class request called GetText, which returns the text string.

Procedure
The following code fragment demonstrates one way to do this.

Code:

'------ Start Script
theView = av.GetActiveDoc
theTheme = theView.GetActiveThemes.Get(0)
theFtab = theTheme.GetFtab
theBitmap = theFtab.GetSelection

for each item in theBitMap

'--- Get the annotation object from the record number using the ReturnValue
'--- request with the record number and the shape field.

theAnnotationObject = theFtab.ReturnValue(theFtab.FindField("Shape"),item)

'--- Display the text

MsgBox.Inf(theAnnotationObject.GetText,"")

end
'------ End Of Script