Attaching Reference Files
Standard NHDOT files can be attached to the current design file with the NHRef VBA routine. The macro includes options to define the directories to be searched and two options for the list of files to be attached.
Note: for a file to be attached, it's name must consist of the state project number as defined by the stno variable followed by one of the standard 3 character file names in the list. If the file is already attached, the program will not attempt to attach it a second time. It will not attach the current design file as a reference file either.
Running the Program:
This macro can be started from the NHDOT pulldown menu (only available to NHDOT users) or use the key-in vba run modNHRef.main.or select modNHRef.main from the list of macros obtained from the Utilities menu (Utilities > Macro > Macros...) The macro will provide options to select the directories to be searched and files to be attached.
Selecting MS_RFDIR Variable will search directories based on the value of the MS_RFDIR configuration variable defined in the project's PCF file. If this list is too long, some items at the end of the list may not be attached. You will be warned if the value of MS_RFDIR is at the 2047 character limit. Individual directory paths defined in MS_RFDIR must end with a "/".
Selecting All Project Directories will search every directory under the one defined by the configuration variable projdir. Projdir is usually defined in the project's PCF file. If projdir is not defined, the program will search the directory containing the current design file and all sub-directories.
Selecting All Standard Files will check file names against a list defined in (_USTN_SITE)macros/drawlist.txt. This file contains lines listing the 3 character drawing code used at NHDOT and a description associated with each drawing. If this file is not found, the user will be prompted for the file that lists the drawings to be attached. The 3 character drawing code is also used as the reference logical name.
Selecting Plan Prep Files will restrict the attachments to alignment (ALI), existing detail (EXD), field check data (EXF), and text (TXT) drawings for use by the Plan Preparation group.
Settings for this program can be predefined in two ways, either by the use of variables in a MicroStation configuration file or by including choices in the key-in used to run the macro. Any choices set with a key-in will override configuration variable settings.
There are two variables that can be set to define default settings displayed in the Search option panel, NHRef_dir and NHRef_file. These would typically be defined in the user's configuration file (UCF) if desired.
- If NHRef_dir = 0 then all directories will be searched.
- If NHRef_dir = 1 then MS_RFDIR
directories will be searched. (default value)
- If NHRef_file = 0 then all standard files will be attached. (default value)
- If NHRef_file = 1 then only Plan Prep files will be attached.
Command Line Options
This is an option to run the program from a key-in that defines the search and attachment choices and bypasses the program settings panel. It provides the option to run the program from a menu or function key. The key-in will be in the format vba run modNHRef.main pm where the characters at the end of the command define the options. Do not put spaces between the options. Using the command line option will override the values of the NHRef_dir and NHRef_file configuration variables. There are four choices:
- a - attach all standard files
- d - search all project directories
- m - search MS_RFDIR directories
- p - attach Plan Prep files only
Related PagesMicroStation v8 Programs