HOW TO

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

Last Published: April 25, 2020

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


Article ID:000001506

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic