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

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.

手順:
  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 click Yes.
  10. Set the Length property to 2000.
  11. [完了] をクリックします。
  12. ヒントヒント:

    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 aviation 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.

手順:
  1. カタログ ツリーで、新しいアノテーション フィーチャクラスを作成するフィーチャ データセットを右クリックします。
  2. [新規作成] [フィーチャクラス] の順に選択します。
  3. 名前 を入力します。
  4. [種類] のドロップダウン矢印をクリックして、[アノテーション フィーチャ] をクリックします。
  5. チェックボックスをオンにして、アノテーションをフィーチャクラスにリンクします。
  6. ドロップダウン矢印をクリックし、新規アノテーション フィーチャクラスをリンクするフィーチャクラスをクリックします。このフィーチャクラスは、作成中のアノテーション フィーチャクラスと同じフィーチャ データセットに含まれている必要があります。後からこのプロパティを変更することはできません。
    New Feature Class dialog box
  7. [次へ] をクリックします。
  8. 座標系ウィンドウで座標系を選択するか、[インポート] または [新規作成] をクリックして座標系を指定します。
  9. [インポート] をクリックすると、既存のフィーチャクラスまたはフィーチャ データセットから座標系をインポートすることができます。

    [新規作成] をクリックすると、座標系を新規作成することができます。

    座標系を選択したら、[変更] をクリックして、その座標系を変更できます。

  10. [次へ] をクリックします。
  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. [次へ] をクリックします。
  13. 基準縮尺を入力します。
  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 Maplex Label Engine.
  17. [次へ] をクリックします。
  18. 最初のアノテーション クラスのテキストが格納されるリンク済みフィーチャクラス フィールドを指定します。複数のフィールドを指定するには、[ラベル フィールド] を選択するか、[条件式] をクリックします。
  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 arrow and choose Advanced Callout.

    Editor dialog box

  21. Click OK.
    ヒントヒント:

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

    注意注意:

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

  22. [次へ] をクリックします。
  23. If your geodatabase is a file or enterprise geodatabase, the Configuration Keyword area appears. Set up a configuration keyword if necessary.

    Configuration Keyword area

  24. [次へ] をクリックします。
  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.
    ヒントヒント:

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

  38. [完了] をクリックします。
  39. Close ArcCatalog.

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.

手順:
  1. Start ArcMap.
  2. Click the Visual Specifications button Visual Specifications on the Production Symbology toolbar.

    The Visual Specifications dialog box appears.

    Visual Specifications dialog box

  3. Make sure that you check the Display Calculated Representation and Calculated Fields tabs check box.
  4. [OK] をクリックします。
  5. Right-click the cartographic feature class for which you want to define the calculated fields and click Properties.

    The Layer Properties dialog box appears.

  6. Click the Calculated Fields tab.
  7. Click the Specification drop-down arrow and choose the specification for which you want to create the field rule.
  8. 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.

    ヒントヒント:

    You can also click Options New Rule.

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

    The Field Properties dialog box appears.

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

    Field Properties dialog box

    注意注意:

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

  12. [OK] をクリックします。
  13. Click the SQL Statement drop-down arrow and choose Edit SQL Statement.
  14. 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.

  15. [OK] をクリックします。
  16. Click the Expression drop-down arrow and choose Edit Expression.

    The Expression Parser dialog box appears.

  17. Type, or copy and paste, the custom XML script into the Expression text box.
    Expression Parser dialog box
    ヒントヒント:

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

  18. If necessary, configure the XML script you want to use to refine the feature selection for the rule.
  19. Verify your script by clicking Verify.
  20. [OK] をクリックします。
  21. Check the Update Feature Class(es) check box to calculate the field in the cartographic feature class.
    注意注意:

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

  22. [適用] をクリックします。
  23. [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.

手順:
  1. Ensure that the correct product library and production database are set.
  2. Make sure that the Instances Maintained property is set correctly from the Configure context menu on the Product Library window.
  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 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 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.
  5. On the main menu, click Customize Toolbars Aviation Data Management.
  6. Click the Feature Display Settings button Feature Display Settings on the Aviation Data Management toolbar.
  7. On the main menu, click Customize Toolbars Aviation Annotation.
  8. Click the Create Feature-Linked Annotation button Create Feature-Linked Annotation on the Aviation Annotation toolbar.

    The Create Feature-Linked Annotation dialog box appears.

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

    The list displayed is built from the Instances Maintained set through the Product Library window.

  10. Check the check boxes next to the annotation classes in the Annotation Class(es) to Process list.
    ヒントヒント:

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

  11. 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.

  12. Click Close once you are finished viewing the results.
  13. [閉じる] をクリックします。

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.

手順:
  1. On the main menu, click Customize Toolbars Aviation Editing.
  2. Click the Production Start Editing button Production Start Editing on the Aviation Editing toolbar.
    注意注意:

    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.

    ヒントヒント:

    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. 注意注意:

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

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

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

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

    The Use Custom check box is very important. The attributes you set in the 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.
    注意注意:

    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.

4/26/2014