Adding the computer name as dynamic text using an expression
The computer name that is added to the map document as dynamic text references the current computer on which the map document is opened. Opening the map document on a different computer updates the name to reflect the different computer name.
The computer name can be added to the map sheet using a VBScript expression. The Expression Parser dialog box allows you to use a field value or array of field values for the selected field to use as the dynamic text.
- Start ArcMap.Conseil :
If the ArcMap - Getting Started dialog box appears, you can open a new or existing map document. You can also check the Do not show this dialog box in the future check box and click Open.
- 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 on the map sheet.
The Dynamic Text Properties dialog box appears.
- Click the Dynamic Text tab if necessary.
- Click the Dynamic Text drop-down arrow and choose Computer Name.
-
Click Insert.
The Computer Name text appears in the text box.
-
Click the dynamic text element in the text field.
The Computer Name Dynamic Text Properties dialog box appears.
- Click the Expression option.
-
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].
Conseil :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 Computer Name Dynamic Text Properties dialog box.
- Click OK to close the Dynamic Text Properties dialog box.
The compute name 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.