English

How To: Control the appearance of annotation arrows

Summary

This document explains how to control the appearance of annotation arrows (a.k.a. leaderlines) created by the SETARROW command in ARCEDIT.

Annotation arrows are hardcoded in ARCEDIT, they are not separate lines. They are part of the annotation text and their appearance is controlled by a textsymbol and not a linesymbol.

This means there is limited control over the appearance of these lines in ARCPLOT. Sometimes arrows also cause problems when converting ArcInfo coverage data to other formats, such as ArcSDE, Microstation.

Procedure

You can convert annotation arrows to lines in a new coverage by using cursors and the GENERATE command.

/* =======================================================================
/* Name: arrow2lines.aml
/* Purpose: creates line coverage from annotation arrows,
/* if this coverage already exists, it will be deleted.
/* Tis aml assumes:
/* - annotation has to have subclass name,
/* - only one annotation subclass per coverage,
/* Usage: Arc: &r arrow2lines
/* Arguments: - name of the coverage with annotation
/* - name of the annotation subclass
/* Date: Jul 20 2000
/* Author: ESRI
/* =======================================================================

&args incover sub

&severity &error &routine bailout
/*&echo &brief

/* ERROR CHECKING AND CLEAN UP...
&if [null %incover%] or [null %sub%] &then
&return &error Usage: &r arrow2lines
&if ^ [exists %incover% -cover] &then
&return &error Coverage %incover% doesn't exist
&if [exists %incover%line -cover] &then
kill %incover%line all

&describe %incover%
&s numannos = %DSC$ANNOS%
&if %numannos% = 0 &then
&return &error Annotation not present in the coverage

&if [exists lincov.gen -file] &then
&s delstat = [delete lincov.gen -file]

/* OPEN A GENERATE FILE
&s funit = [open lincov.gen openstat -write]

/* MAIN PROCESSING - FIND OUT WHICH ANNOTATIONS HAVE ARROWS,
/* READ ARROWS COORDINATES AND WRITE THEM TO ASCII, GENERATE FILE.
display 0
ae
ec %incover%
ef anno.%sub%
sel all
&s j = 0
cursor open
&do &while %:edit.AML$NEXT%
&s arrowpnts = [show anno.%sub% [show select 1] narrow]
&if %arrowpnts% > 0 &then &do
&s j = %j% + 1
&s record = %j%
&s writestat = [write %funit% %record%]
&do i = 1 &to %arrowpnts%
&s arrow%j%pnt%i% = [show anno.%sub% [show select 1] arrow %i%]
&s record = [value arrow%j%pnt%i%]
&s writestat = [write %funit% %record%]
&end
&s record = END
&s writestat = [write %funit% %record%]
&end
cursor next
&end
&s record = END
&s writestat = [write %funit% %record%]
&s closestat = [close %funit%]
cursor close
quit /* from ARCEDIT
n

/* GENERATE LINE COVERAGE FROM ASCII FILE
generate %incover%line
input lincov.gen
line
quit
build %incover%line line

/* SHOWING THE RESULTS
ae
&if [extract 1 [show display]] ne 9999 &then
display 9999
ec %incover%
de arc anno.%sub%
bc %incover%line 2
be arc
draw
&echo &off

&ty NOW ZOOM IN TO THE PLACE WHERE YOU KNOW THERE ARE ANNO ARROWS
&ty YOU CAN ZOOM IN COUPLE TIMES, ONCE YOU FIND A GOOD SPOT,
&ty PRESS ANY KEY TO CONTINUE AN AML....
&ty
&pause

de anno.%sub% off
draw

&ty WHAT YOU SEE IN RED COLOR, ARE LINES SIMULATING ANNOTATION ARROWS
&ty

&return

&routine bailout
&severity &error &ignore
&if [show program] = ARCEDIT &then
cursor close
&s closestat = [close -all]
&echo &off
&return



Note:
The aml doesn't create arrowheads, it only creates lines pointing from the annotation to the feature.

Once you have a new coverage with lines simulating annotation arrows, you can delete the arrows from the original coverage.


Warning:
It is recommended to keep a backup copy of the original coverage with annotation and arrows.