Workflow: Creating annotation with an advanced callout and multiple text elements

The advanced callout functionality allows you to modify the background symbol, shape, margins, splits, and leader line of the callout. The multiple text element functionality allows you to have multiple and individual text elements, including a vertical Morse code element, whose placement and style can be edited. Several steps are involved in creating advanced callout annotation with multiple text elements: setting up cartographic feature classes, creating annotation feature classes, setting up calculated field specifications, and creating and editing advanced annotation.

Setting up cartographic feature classes

The cartographic feature class is where the initial text string is calculated to create annotation. This is typically done in a field such as "Label_Txt". The text string produced by the XML script contains all the formatting and identification tags and is lengthy, meaning the field must be set to a high value to avoid any database conflicts.

Since the annotation is generated based on the text string field, it requires that the length of the field containing the label be long enough to accommodate the labels generated by the XML scripts.

Steps:
  1. Start ArcCatalog.
  2. Navigate to the geodatabase that contains the cartographic feature class you want to use for generating annotation.
  3. Right-click the cartographic feature class and click Properties.

    The Feature Class Properties dialog box appears.

    Feature Class Properties

  4. In the Field Name column, select Label_Txt or a similar field.
  5. Verify that the Length property under Field Properties is set to a value greater than 2,000.
  6. If the value is less than 2,000, add a field by clicking in the blank row in the Field Name column and type a name.
  7. Click in the Data Type column next to the new field's name and choose Text.
  8. To create an alias for this field, click the field next to Alias and type the alias for this field.
  9. To allow null values to be stored in this field, click the field next to Allow NULL values, click the drop-down arrow, then choose Yes.
  10. Set the Length property to 2000.
  11. Click Finish.
  12. TipTip:

    If the cartographic feature class is already created, you can set the field length when creating or editing a calculated field rule or in SQL Server Management Studio if you are using a SQL-based database.

Creating an annotation feature class

An annotation feature class that uses the advanced callout/multiple text element functionality is not much different than any other annotation feature class within the database. However, annotation feature classes that have the advanced callout/multiple text element functionality need to be created with a few additional parameters that need to be set to ensure that the annotation is created correctly.

For additional information, see Creating Aeronautical annotation feature classes.

In addition to creating feature-linked annotation, annotation feature classes with advanced callouts require defining properties for the background, shadow, arrowhead, margin, callout, and placement options.

Steps:
  1. In the Catalog tree, right-click the feature dataset in which you want to create the new annotation feature class.
  2. Point to New > Feature Class.
  3. Type the Name.
  4. Click the Type drop-down arrow and click Annotation Features.
  5. Check the check box to link the annotation to a feature class.
  6. Click the drop-down arrow and click the feature class to which you want to link the new annotation feature class. The feature class must be in the same feature dataset as the annotation feature class you are creating. You cannot change this property later.
    New Feature Class dialog box
  7. Click Next.
  8. Either navigate to and click a coordinate system in the coordinate system window or click Import or New to specify a coordinate system.
  9. Import lets you import a coordinate system from an existing feature class or feature dataset.

    New allows you to create a new coordinate system.

    Once you have chosen a coordinate system, you can click Modify to alter it.

  10. Click Next.
  11. The x/y domain is calculated based on the coordinate system you specified in step 8. You can type a different x/y domain if you want, but the default should be sufficient.
  12. Click Next.
  13. Enter a reference scale.
  14. Click the Map Units drop-down arrow and choose the units in which you want your annotation stored. The units should match the units you specified for your coordinate system in step 8.
  15. Under Editing Behavior, uncheck the Create annotation when new features are added and Update annotation when feature's shape is modified check boxes.

    For a description of each of these three options, see annotation feature class editing properties.

  16. Click the Label Engine drop-down arrow and choose ESRI Maplex Label Engine.
    New Feature Class dialog box
  17. Click Next.
  18. Specify the linked feature class fields that contain text for the first annotation class. You can choose a Label Field or click Expression to specify more than one field.
  19. Click Leader in the Text Symbol area.
  20. In the Properties area of the Editor dialog box that appears, click the Type drop-down box and choose Advanced Callout.

    Editor dialog box

  21. Click OK.
    TipTip:

    You do not need to set up any annotation properties at this point, because all of them are overridden by the XML script.

    NoteNote:

    If you add any additional annotation classes, ensure that you set the Type drop-down option to Advanced Callout.

  22. Click Next.
  23. If your geodatabase is a file or ArcSDE geodatabase licensed for ArcGIS Server Enterprise, the Configuration Keyword area appears. Set up a configuration keyword if necessary.

    Configuration Keyword area

  24. Click Next.
  25. Click the TextString field.
  26. Click the text box to the right of the Length field property and set it to 2000 or higher.
    Field Properties area
  27. To add the first field to the feature class, click the first blank row in the Field Name column and type MapId_Txt.
  28. Click in the Data Type column next to the new field's name and choose Text.
  29. To create an alias for this field, click the text box next to Alias and type the alias.
  30. Change the Length field property to 255.
  31. To add the second field to the feature class, click the next blank row in the Field Name column and type IsVisible.
  32. Click in the Data Type column next to the new field's name and choose Short Integer.
  33. Type 1 for the Default Value.
  34. To associate a domain with this field, click the field next to Domain and choose Code_Yes_No.
  35. To add the third field to the feature class, click the next blank row in the Field Name column and type AnnoSizeChange.
  36. Click in the Data Type column next to the new field's name and choose Double.
  37. Type 0 for the Default Value.
    TipTip:

    Click Import if you want to import field definitions from another feature class or table.

  38. Click Finish.

Setting up the calculated field specification

You must have previously set up visual specifications and specified the location of the visual specifications table in the database you are using. Visual specifications are used to calculate the individual values for each record in the database according to the XML script. The XML script must be configured for each individual annotation feature class to be able to create annotation.

Calculated fields allow you to determine the appearance of labels and annotation or basic data type values based on attributes you select. The fields are grouped based on the specification you choose.

Steps:
  1. Start ArcMap.
  2. On the main menu, click Customize > Production > Production Properties.

    The Production Properties dialog box appears.

  3. If necessary, click Data Management.
  4. Click the cell next to Set Tool Options.
  5. Click the drop-down arrow that appears.
  6. Click the ellipsis (...) next to Visual Specifications.
  7. Make sure that you check the Display Calculated Representation and Calculated Fields tabs check box.
  8. Click OK twice to close the dialog boxes.
  9. Right-click the cartographic feature class for which you want to define the calculated fields and click Properties.

    The Layer Properties dialog box appears.

  10. Click the Calculated Fields tab.
  11. Click the Specification drop-down arrow and choose the specification for which you want to create the field rule.
  12. Add a new calculated field rule by right-clicking anywhere in the white space where the rules are displayed and clicking New Rule.

    Layer Properties

    A new row appears in the rule table.

    TipTip:

    You can also click Options, then New Rule.

  13. Double-click the Rule Description space for the new rule and type a description.
  14. Click the ellipsis (...) in the Field Name cell.

    The Field Properties dialog box appears.

  15. Choose the appropriate field from the Name drop-down list and ensure that its length is at least 2000.

    Field Properties dialog box

    NoteNote:

    If the length is less than 2,000, you can add a field with length greater than 2000 in ArcCatalog.

  16. Click OK.
  17. Click the SQL Statement drop-down arrow and choose Edit SQL Statement.
  18. Type the SQL statement for the features you want to include with the rule.

    Query Builder dialog box

    For additional information about defining a SQL statement, see Defining SQL statements for visual specifications.

  19. Click OK.
  20. Click the Expression drop-down arrow and choose Edit Expression.

    The Expression Parser dialog box appears.

  21. Type, or copy and paste, the custom XML script into the Expression text box.
    Expression Parser dialog box
    TipTip:

    You can import an XML in VB Script File if you have one already by clicking Load.

  22. If necessary, configure the XML script you want to use to refine the feature selection for the rule.
  23. Verify your script by clicking Verify.
  24. Click OK.
  25. Check the Update Feature Class(es) check box to calculate the field in the cartographic feature class.
    NoteNote:

    You can also calculate the field through the Calculate Visual Specification tool to be able to create annotation.

  26. Click Apply.
  27. Click OK.

Creating advanced annotation

To generate annotation using the Create Feature-Linked Annotation tool, you must have the annotation feature class, as well as the linked source feature class, loaded into the Table Of Contents window. The data frame also needs to be associated with an instance from the product library for which annotation has to be created.

Steps:
  1. Ensure that the correct product library and production database are set in the Data Management pane on the Production Properties dialog box.
  2. Make sure that the Instances Maintained property is set correctly under Set Tool Options on the Data Management pane of the Production Properties dialog box.
  3. Verify that each annotation feature layer you are creating annotation for has its own matching source feature layer in the document.
  4. On the main menu, click Customize > Extensions and make sure that the Maplex check box is checked.
  5. On the main menu, click View > Data Frame Properties.
    1. Click the General tab.
    2. Verify that the data frame's reference scale matches that of the given chart.
    3. Verify that the data frame's rotation matches that of the given chart.
    4. Verify that the Label Engine is set to ESRI Maplex Label Engine.
    5. Click the Coordinate System tab.
    6. Verify that the data frame's projection matches that of the given chart.
    7. Click OK.
  6. On the main menu, click Customize > Toolbars > Labeling.
  7. On the Labeling toolbar, click Labeling > Options.
    1. Click the Maplex tab.
    2. Make sure the Enable connection of line segments into continuous features check box is unchecked.
    3. Click OK.
  8. Click the Placement Quality drop-down arrow on the Labeling toolbar and choose an option.

    Best is the recommended setting. If Best is selected, Maplex considers more trial positions for the label.

  9. On the main menu, click Customize > Toolbars > Aeronautical Data Management.
  10. Click the Feature Display Settings button Feature Display Settings on the Aeronautical Data Management toolbar.
  11. On the main menu, click Customize > Toolbars > Aeronautical Annotation.
  12. Click the Create Feature-Linked Annotation button Create Feature-Linked Annotation on the Aeronautical Annotation toolbar.

    The Create Feature-Linked Annotation dialog box appears.

    Create Feature-Linked Annotation dialog box
  13. Check the check boxes next to the instances you want to process.

    The list displayed is built from the Instances Maintained set on the Production Properties dialog box.

  14. Check the check boxes next to the annotation classes in the Annotation Class(es) to Process list.
    TipTip:

    You can use the Select All, Clear All, and individual check boxes to choose the annotation classes.

  15. Click OK.

    For each feature class that is linked to the annotation feature classes, the tool determines which features do not have annotation in the selected chart. It then creates annotation for those features. It also gives the annotation a MAPID, ensures word spacing is set to 100, changes the color of the background symbol, and resizes arrowheads and accent bar gaps so they are correct for the map scale.

    The Create Feature-Linked Annotation Results dialog box appears and shows the results of the annotation that has been generated, updated, or deleted.

  16. Click Close once you are finished viewing the results.

    The Create Feature-Linked Annotation dialog box appears.

  17. Click Close.

Editing advanced annotation

Editing advanced annotation has all the customization ability that the XML provides but allows you to customize individual pieces of annotation and override the settings in the XML.

Advanced callout annotation can be edited and customized in an edit session by editing parameters on the Editor dialog box. You can set a variety of parameters and placement options for the appearance of an advanced callout annotation.

Steps:
  1. On the main menu, click Customize > Toolbars > Aeronautical Editing.
  2. Click the Production Start Editing button Production Start Editing on the Aeronautical Editing toolbar.
    NoteNote:

    The Manage Features and Create Attributes, Update Attributes, or Metadata Attributes windows automatically appear when you start an edit session using the Production Start Editing tool.

    TipTip:

    If the Create Attributes, Update Attributes, or Metadata Attributes window does not appear when you start an edit session, click the Show/Hide Attributes button Show/Hide Attributes on the Manage Features window.

  3. NoteNote:

    If using a versioned environment, make sure you are in the correct database.

  4. Click the Edit Annotation tool Edit Annotation on the Aeronautical Annotation toolbar.
  5. Click an advanced annotation feature to select it.
  6. Right-click the annotation piece and click Properties.
    TipTip:

    You can also click the Attributes button Attributes on the Editor toolbar.

  7. Click Leader.
  8. Check the Use Custom check box.
    Editor dialog box
    NoteNote:

    The Use Custom check box is very important. The attributes you set in the shortcut menu will not be applied to that piece of annotation unless this check box is checked.

  9. Modify the Background, Shadow, Callout, Arrowhead, and Margins parameters in the Editor dialog box to customize the annotation as necessary.
  10. Click Placement Options.

    The Text Placement Properties dialog box appears.

    Text Placement Properties dialog box
  11. Check the Use Custom check box.
  12. Modify the placement properties of the Top, Middle, Bottom, Left, and Right text elements as necessary.
    NoteNote:

    Only options that are available are active.

  13. Click OK.

    The Editor dialog box appears.

  14. Click OK on the Editor dialog box.

    The Attributes dialog box appears.

  15. Click Apply on the Attributes dialog box.
  16. Click OK to close the Attributes dialog box.

Creating a label expression (LXP)

A label expression is used to adjust the formatting of your annotation. This uses ArcGIS formatting tags to control how the annotation displays the font, size, color, orientation, or line weight. If you intend to use annotation abbreviation options, see the example LXP below.

The label expression below can be used to abbreviate advanced/callout annotation.

Function FindLabel ( [IAPNAVAID_LBL], [LABELSTATUS_CODE] )

ValueArray = Split([IAPNAVAID_LBL], "||")
 
LABELSTATUS_CODE_arr =Split( [LABELSTATUS_CODE] ,"<>") 

OBJECTID= ValueArray(0)
OBJECTID_arr= Split(OBJECTID ,"<>") 

PRIMARYNAVAID_CODE=ValueArray(2) 
if IsNull(PRIMARYNAVAID_CODE) or PRIMARYNAVAID_CODE ="" Then 
         PRIMARYNAVAID_CODE_arr= Split(" " ,"<>") 
else
 PRIMARYNAVAID_CODE_arr= Split(PRIMARYNAVAID_CODE ,"<>") 
end if

SystemSubtype= ValueArray(3) 
SystemSubtype_arr= Split(SystemSubtype,"<>") 

Ident_Txt= ValueArray(4) 
Ident_Txt_arr=Split(Ident_Txt ,"<>") 

Frequency_Val= ValueArray(5)
Frequency_Val_arr= Split( Frequency_Val,"<>")
 
Channel_Txt= ValueArray(6) 
Channel_Txt_arr= Split( Channel_Txt,"<>")

Voice_Code= ValueArray(7) 
Voice_Code_arr= Split(Voice_Code,"<>") 

ComponentSubtype= ValueArray(8) 
ComponentSubtype_arr=Split( ComponentSubtype,"<>") 

Name_Txt= ValueArray(9)
Name_Txt_arr= Split(Name_Txt ,"<>") 

LAT_TXT= ValueArray(10)
LAT_TXT_arr= Split(LAT_TXT ,"<>") 

LONG_TXT= ValueArray(11)
LONG_TXT_arr= Split(LONG_TXT ,"<>") 

ROLEFIX_CODE= ValueArray(12) 
ROLEFIX_CODE_arr= Split(ROLEFIX_CODE ,"<>")

FindLabel = "<MultipleTextElement>" & TextBackground
(PRIMARYNAVAID_CODE_arr) & TextElement (OBJECTID_arr,
SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr,
Channel_Txt_arr, Voice_Code_arr, ComponentSubtype_arr,
Name_Txt_arr, LAT_TXT_arr, LONG_TXT_arr, ROLEFIX_CODE_arr,
LABELSTATUS_CODE_arr) & "</MultipleTextElement>" 
End Function

Function TextBackground (PRIMARYNAVAID_CODE_arr) 
TextBackground ="<TextBackground Units = 'Points'>" & Background
(PRIMARYNAVAID_CODE_arr) & Callout & Shadow & Margins
& Placement & "</TextBackground>" 
End Function

Function Background (PRIMARYNAVAID_CODE_arr) 
If PRIMARYNAVAID_CODE_arr(0) = "1" Then 
   Width = "0.7" 
Else 
   Width ="0.2" 
End If 
Background = "<BackgroundRoundness='0'><Symbol><Outline Width='" & Width
& "'><CLR Red='0' Green='0' Blue
='0'></CLR></Outline></Symbol></Background>"
End Function

Function Callout 
Callout = "<Callout Tolerance='10.0'Snap='True' Truncated='100'><Symbol><Outline
Width='0.2'><CLR Red='0' Green='0' Blue ='0'></CLR></Outline><Fill><CLR Red='0'
Green='0' Blue ='0'></CLR></Fill><Arrowhead Size='0'><CLR Red='0' Green='0' Blue
='87'></CLR></Arrowhead></Symbol></Callout>"
End Function 

Function Shadow 
Shadow = "<Shadow HorizontalOffset ='0' VerticalOffset ='0'><Symbol><Outline
Width='0.2'><CLR Red='0' Green='0' Blue ='0'></CLR></Outline><Fill><CLR Red='0'
Green='0' Blue ='0'></CLR></Fill></Symbol></Shadow>"
End Function

Function Margins 
Margins = "<Margins Top='2.0' Bottom='2.0' Left='2.0' Right='2.0'></Margins>" End Function 

FunctionPlacement 
Placement = "<ElementPlacement><Top Style='Box' SplitOffset='0' HAlign='Center'
VAlign='Center'></Top><Middle Style='Outside' SplitOffset='0' HAlign='Center'
VAlign='Baseline'></Middle><Left Style='TopCorner' SplitOffset='2.0' HAlign='Center'
VAlign='Baseline'></Left><Right Style='Center' SplitOffset='0' HAlign='Center'
VAlign='Baseline'></Right><Bottom Style='Box' SplitOffset='0' HAlign='Center'
VAlign='Baseline'></Bottom></ElementPlacement>" 
End Function

Function TextElement (OBJECTID_arr, SystemSubtype_arr,
Ident_Txt_arr, Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
ComponentSubtype_arr, Name_Txt_arr, LAT_TXT_arr, LONG_TXT_arr,
ROLEFIX_CODE_arr, LABELSTATUS_CODE_arr) 
TextElement = TopTextElement (OBJECTID_arr, SystemSubtype_arr, Ident_Txt_arr,
              Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
              ComponentSubtype_arr, Name_Txt_arr, ROLEFIX_CODE_arr,
              LABELSTATUS_CODE_arr) _ 
            & MiddleTextElement (OBJECTID_arr,SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr,
              Channel_Txt_arr, Voice_Code_arr, ComponentSubtype_arr,
              Name_Txt_arr, LAT_TXT_arr, LONG_TXT_arr, LABELSTATUS_CODE_arr)_
            & BottomTextElement (OBJECTID_arr, SystemSubtype_arr,
              Ident_Txt_arr, Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
              ComponentSubtype_arr, Name_Txt_arr) _ 
            & RightTextElement (OBJECTID_arr, SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr,
              Channel_Txt_arr, Voice_Code_arr, ComponentSubtype_arr,
              Name_Txt_arr) _ 
            & LeftTextElement (OBJECTID_arr, SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr,
              Channel_Txt_arr, Voice_Code_arr, ComponentSubtype_arr, Name_Txt_arr) 
End Function

Function TopTextElement (OBJECTID_arr, SystemSubtype_arr,
Ident_Txt_arr, Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
ComponentSubtype_arr, Name_Txt_arr, ROLEFIX_CODE_arr,
LABELSTATUS_CODE_arr) 
SFONT = "<fnt name='Tw Cen MT' size='7'>" 
EFONT = "</fnt>" 
strRole = ROLEFIX_CODE_arr(0)

If LABELSTATUS_CODE_arr(0) = "Abbreviate IAF" Then 
 TopTextElement = "" 
Else 
 TopTextElement = "<TopTextElement>" & SFONT & strRole & vbnewline & EFONT & "</TopTextElement>"
End If 

End Function

Function MiddleTextElement (OBJECTID_arr, SystemSubtype_arr,
Ident_Txt_arr, Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
ComponentSubtype_arr, Name_Txt_arr, LAT_TXT_arr, LONG_TXT_arr,
LABELSTATUS_CODE_arr) 
SFONT = "<fnt name='Tw Cen MT' size='7'>" 
EFONT = "</fnt>"

strFreqUnd = 0 
select case SystemSubtype_arr(0) 
case 1 'Marker 

case 2 'LocatorMarker = Marker + NDB 

case 3 'NDB 
           strName = Name_Txt_arr(0) 
        strIdent = Ident_Txt_arr(0) 
        strFreq = Frequency_Val_arr(0) 
        if Voice_Code_arr(0) = 0 then 
        strFreqUnd = 1
end if

case 4 'NDBDME = NDB + DME 
         i = 0 
         do while i <ubound(ComponentSubtype_arr) + 1 
                  if ComponentSubtype_arr(i) = 2 then 
                         strIdent = Ident_Txt_arr(i) 
                         strName = Name_Txt_arr(i) 
                         strChan= "Chan " & Channel_Txt_arr(i) 
                  end if 
                  if ComponentSubtype_arr(i) = 1 then 
                          strFreq = Frequency_Val_arr(i) 
                  end if 
                  if Voice_Code_arr(i) = 0 then 
                           strFreqUnd = 1 
                  end if 
                  i = i + 1
         loop
case 5 'DME 
         strName = Name_Txt_arr(0) 
         strIdent = Ident_Txt_arr(0)
         strFreq = "" 
         strChan = "Chan " & Channel_Txt_arr(0) 
case 6 'VORDME = VOR + DME 
         i = 0 
         do while i < ubound(ComponentSubtype_arr) + 1 
                  if ComponentSubtype_arr(i) = 2 then 
                            strIdent = Ident_txt_arr(i) 
                            strName = Name_Txt_arr(i) 
                            strChan = "Chan " & Channel_txt_arr(i) 
                  end if 
                  if ComponentSubtype_arr(i) = 3 then 
                           strFreq = Frequency_Val_arr(i) 
                  end if 
                  if Voice_Code_arr(i) = 0 then 
                           strFreqUnd = 1 
                  end if 
                  i = i + 1
          loop

case 7 'VOR 
         strIdent = Ident_Txt_arr(0) 
         strName = Name_Txt_arr(0)
         strFreq = Frequency_Val_arr(0) 
         strChan = "" 
case 8 'VORTAC = VOR + TACAN  
         do while i < ubound(ComponentSubtype_arr) + 1  
                  if ComponentSubtype_arr(i) = 3 then 
                          strIdent = Ident_Txt_arr(i)
                          strName = Name_Txt_arr(i) 
                          strFreq = Frequency_Val_arr(i) 
                  end if 
                  if Voice_Code_arr(i) = 0 then 
                           strFreqUnd = 1 
                  end if 
                  if ComponentSubtype_arr(i) = 4 then 
                           strChan = "Chan " & Channel_Txt_arr(i) 
                  end if 
                  i = i + 1 
          loop 
case 9 'TACAN 
         strIdent = Ident_Txt_arr(0) 
         strName = Name_Txt_arr(0) 
         strFreq = "" 
         strChan = "Chan " & Channel_Txt_arr(0) 
case 10 'MLSElevation

case 11 'MLS 
         do while i < ubound(ComponentSubtype_arr) + 1 
                  if ComponentSubtype_arr(i) = 2 then 
                           strIdent = Ident_Txt_arr(i)
                           strName = Name_Txt_arr(i) 
                           strChan = "Chan " & Channel_Txt_arr(i) 
                  end if 
                  if ComponentSubtype_arr(i) = 6 then
                           strFreq = Frequency_Val_arr(i) 
                  end if 
                  if Voice_Code_arr(i) = 0 then
                           strFreqUnd = 1 
                  end if 
                  i = i + 1 
           loop 
case 12 'MLSAzimuth 
case 13 'LocalizerApproachSystem 
         strIdent = Ident_Txt_arr(0) 
         strName = "LOCALIZER" 
         do while i < ubound(ComponentSubtype_arr) + 1 
                  if ComponentSubtype_arr(i) = 7 then 
                           strFreq = Frequency_Val_arr(i) 
                  end if 
                  if Voice_Code_arr(i) = 0 then 
                           strFreqUnd = 1 
                  end if 
                  if ComponentSubtype_arr(i) = 2 then 
                           strChan = "Chan " & Channel_Txt_arr(i) 
                  end if 
                  i = i + 1 
            loop
case 14 'ILS 
         strName = "LOCALIZER" 
         do while i < ubound(ComponentSubtype_arr) + 1 
                  if ComponentSubtype_arr(i) = 7 then 
                           strIdent = Ident_Txt_arr(i) 
                           strFreq = Frequency_Val_arr(i) 
                  end if 
                  if Voice_Code_arr(i) = 0 then 
                           strFreqUnd = 1 
                  end if 
                  if ComponentSubtype_arr(i) = 2 then 
                           strChan = "Chan " & Channel_Txt_arr(i) 
                  end if 
                  i = i + 1 
            loop 
'case 15 'GlidePath 

end select 

if strFreqUnd = 1 then 
          strFreq = "<und>" & strFreq & "</und>" 
end if 

'logic to determine whether to keep the name??? 
if strName = "" then 
         outStr = strIdent & VerticalMorseCode & strIdent & "</fnt></VMC>"
         outStr = outStr & vbcrlf & strFreq 
elseif strChan = "" or LABELSTATUS_CODE_arr(0) = "Abbreviate Channel" then 
          outStr = strName 
          outStr = outStr & vbcrlf & strFreq & " " & strIdent 
          outStr = outStr & VerticalMorseCode & strIdent & "</fnt></VMC>" 
else 
          outStr = strName 
          outStr = outStr & vbcrlf & strFreq & " " & strIdent 
          outStr = outStr & VerticalMorseCode & strIdent & "</fnt></VMC>" 
          outStr = outStr & vbcrlf & strChan 
end if

'determine hemisphere 
if LAT_TXT_arr(0) < 0 then 
         latHemi = "S"
else 
         latHemi = "N" 
end if 

if LONG_TXT_arr(0) < 0 then 
         longHemi = "W" 
else 
         longHemi = "E" 
end if

'make decimal degree values positive 
decLat = abs(LAT_TXT_arr(0))
decLong = abs(LONG_TXT_arr(0)) 

'get degree information from decimal
degree value dmsLatDeg = int(decLat) 
dmsLongDeg = int(decLong) 

'get decimal value 
decLatMin = decLat - dmsLatDeg 
decLongMin = decLong - dmsLongDeg 

'turn decimal value into minutes 
dmsLatMin = round(decLatMin * 60, 2) 
dmsLongMin = round(decLongMin * 60, 2)

if dmsLatDeg < 10 AND NOT dmsLatMin < 10 then 
         strLat = latHemi & "0" & dmsLatDeg & chr(176) & dmsLatMin & "'" 
else if NOT dmsLatDeg < 10 AND dmsLatMin < 10 then
         strLat = latHemi & dmsLatDeg & chr(176) & "0" & dmsLatMin & "'" 
else if dmsLatDeg < 10 AND dmsLatMin < 10 then 
         strLat = latHemi & "0" & dmsLatDeg & chr(176) & "0" & dmsLatMin & "'" 
else 
         strLat = latHemi & dmsLatDeg & chr(176) & dmsLatMin & "'" 
end if 

if dmsLongDeg < 10 AND NOT dmslongMin < 10 then 
         strLong = longHemi & "0" & dmsLongDeg & chr(176) & dmsLongMin & "'" 
elseif NOT dmsLongDeg < 10 AND dmsLongMin < 10 then
         strLong = longHemi & dmsLongDeg & chr(176) & "0" & dmsLongMin & "'" 
elseif dmsLongDeg < 10 AND dmsLongMin < 10 then 
         strLong = longHemi & "0" & dmsLongDeg & chr(176) & "0" & dmsLongMin & "'" 
else 
strLong = longHemi & dmsLongDeg & chr(176) & dmsLongMin & "'"
end if 
strDesig = strLat & vbnewline & strLong

If LABELSTATUS_CODE_arr(0) = "Abbreviate Channel" Then
   MiddleTextElement = "<MiddleTextElement>" & SFONT & outStr & vbnewline & strDesig & vbnewline & EFONT
& "</MiddleTextElement>" 'MiddleTextElement = "<MiddleTextElement>" & SFONT & strName & vbcrlf
& strFreq & " " & strIdent & VerticalMorseCode & strIdent & vbnewline & strDesig & 'vbnewline
& EFONT & "</MiddleTextElement>" 
Elseif LABELSTATUS_CODE_arr(0) = "Abbreviate Coordinates" Then
MiddleTextElement = "<MiddleTextElement>" & SFONT &
outStr & EFONT & "</MiddleTextElement>" 
Else
MiddleTextElement = "<MiddleTextElement>" & SFONT & outStr & vbnewline & strDesig & vbnewline & EFONT
& "</MiddleTextElement>"

End If 'MiddleTextElement = "<MultipleTextElement>" & TextBackground & MiddleText &
"</MultipleTextElement>" 
End Function

Function BottomTextElement (OBJECTID_arr, SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
ComponentSubtype_arr, Name_Txt_arr) BottomTextElement = "" 
End Function

Function LeftTextElement (OBJECTID_arr, SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr, Channel_Txt_arr, Voice_Code_arr,
ComponentSubtype_arr, Name_Txt_arr) LeftTextElement = "" 
End Function 

Function RightTextElement (OBJECTID_arr, SystemSubtype_arr, Ident_Txt_arr, Frequency_Val_arr,
Channel_Txt_arr, Voice_Code_arr, ComponentSubtype_arr, Name_Txt_arr) RightTextElement = "" 
End Function 

Function VerticalMorseCode VerticalMorseCode = "<VMC><fnt
name='PLTS Aeronautical VMC' size ='6'>"
End Function





This workflow guided you through creating advanced callout annotation with multiple text elements by setting up cartographic feature classes, creating annotation feature classes, setting up calculated field specifications, and creating and editing advanced annotation. You should now have advanced annotation in your chart.


7/31/2012