To Enter a Formula in a Leader Note (AutoCAD Mechanical Toolset)

This topic uses the example of creating a hole note to illustrate how to enter a formula in a leader note.

Note: The formula for this example is:
 =<if(equal(Hole:tapped,"0"),"%%c" Hole:dia,Hole:nominal)>
The formula displays the nominal diameter of a tapped hole, and if the hole is not tapped, it displays the diameter of the hole.
  1. Click Annotate tabSymbol panelLeader Note. Find
  2. Select the hole to attach the note to and click in the drawing area to place the note.
  3. Click Leader Note tab > Text Formatting panel > Display Mode. Find
  4. From the display mode list, select Plain text.
  5. In the note text editor, delete any text that appears by default and type = as the first character.
  6. In the note text editor, enter the required formula:
    1. Click Leader Note tab > Insert panel > Variables, and select Functions IF. The note text editor shows =<IF(,,)>.
    2. In the note text editor, place the cursor after the open bracket, click Leader Note tab > Insert panel > Variables, and select Functions EQUAL. The note text editor shows =<IF(<EQUAL(,)>,,)>.
    3. In the note text editor, place the cursor after the second open bracket, click Leader Note tab > Insert panel > Variables, and select Hole TAPPED. The note text editor shows =<IF(<EQUAL(<HOLE:TAPPED>,)>,,)>
    4. Add "0" as the second parameter for the EQUAL function, such that the note text editor reads =<IF(EQUAL(HOLE:TAPPED,"0"),, )>
    5. Place the cursor between the two commas after the EQUAL function and click the diameter symbol from the list of special characters (Leader Note tab > Insert panel Find). The note text editor shows <IF(EQUAL(HOLE:TAPPED,"0"),"%%c",)>
    6. Place the cursor after "%%c", click Leader Note tab > Insert panel > Variables, select Hole DIA. The note text editor shows =<IF(EQUAL(HOLE:TAPPED,"0"),"%%c" HOLE:DIA,)>
    7. Place the cursor between HOLE:DIA, and ), click Leader Note tab > Insert panel > Variables, select Hole NOMINAL. The note text editor reads =<IF(EQUAL(HOLE:TAPPED,"0"),"%%c" HOLE:DIA,HOLE:NOMINAL)>
    8. Verify that the note text editor reads =<IF(EQUAL(HOLE:TAPPED,"0"),"%%c" HOLE:DIA,HOLE:NOMINAL)>
  7. Click Leader Note tab > Text Formatting panel > Display Mode. Find
  8. From the display mode list, select Rendered text colored and verify that the formula renders correctly.
  9. Click Leader Note tab > Close Editor panel > Close. Find