Adding a feature layer as dynamic text using an expression
Feature layer dynamic text can be added to the map sheet using a VBScript expression via the Expression Parser dialog box.
- Start ArcMap.
- On the main menu, click Customize > Toolbars > MPS Atlas.
-
Click the Add Dynamic Text button on the MPS Atlas toolbar.
A crosshair with a letter A appears.
-
Click anywhere in the map sheet layout.
A piece of dynamic text is inserted on the page.
-
Double-click the dynamic text.
The Dynamic Text Properties dialog box appears.
- Click the Dynamic Text tab if necessary.
- Click the Dynamic Text drop-down arrow and choose Feature Layer.
-
Click Insert.
The Feature Layer Attributes text appears in the text box.
-
Click the dynamic text element in the text field.
The Feature Layer Dynamic Text Properties dialog box appears.
- Click the Data Frame drop-down arrow and choose the data frame that contains the layer with the attributes you want to use.
- Click the Layer drop-down arrow and choose the layer you want to use.
- Click the Return features that and the drop-down arrows and choose options to return the features you want.
- Click OK.
- Click the Expression option in the Text String area.
-
Click Edit Script.
The Expression Parser dialog box appears.
- In the Expression area, click to right of the Generate = expression.
- Double click a field name in the Parameter list.
In the Expression area, the field name appears to the right of Generate =: Generate = [NAME].
Astuce:Double click a field name without an _arr suffix.
- Click Verify.
The Output area lists Function evaluated successfully.
- Click OK to close the Expression Parser dialog box.
- Click OK to close the Feature Layer Dynamic Text Properties dialog box.
- Click OK to close the Dynamic Text Properties dialog box.
The feature layer dynamic text displays in the page layout.
If you change the layer or data frame, the expression will be cleared. A new layer will require a new set of function parameters.