Executing Long Sets of Key-in
Strings
Many dialog boxes in MicroStation have limitations
to the length of strings that can be entered into
them. For example the Function Keys dialog
when creating or editing a function key value has
a 56 character limitation.
Lets say that you want
to set up a function key that allows you set up an
active design files settings and view display
for a customer submittal and because you have a lot
of drawings to get ready you will need to do this
many times.
Because the quantity of settings
you want to ensure is large, the key-ins required
will take far more than 56 characters, so you cant
do the whole thing with one function key.
The solution for this is really
simple. Create a text file that contains all the key-in
commands that you want to run in the appropriate order,
one command to a line. Save this text file with an
appropriate name in a directory that is not too deep
in the directory structure. Make sure that you do
not use spaces in the file name or place it in a directory
path that has a space in it.
Now all you need to do to
run this script from the MicroStation key-in browser
or from a function key is to call it using the @
character and the full path of the text file. Heres
an example of what you would type if the path to your
script file was c:\scripts\project35\setdgn.txt:
@c:\scripts\project35\setdgn.txt
Make sure there are no spaces
used anywhere in the string and also make sure that
the full string does not exceed the maximum characters
allowed in the dialog box.