How to string keyins together or create
keyin scripts
2SiSinga
therapy
Original Article Date: January 2001
Updated: August 2006
Originally titled The Power of Keyins - Part 2 and published in the July 2000 issue of the MicroStation
Manager Magazine, this tutorial covers how to create script files to streamline your workflows.
The ability to string keyins together is often referred to as a keyin script or action string. Whatever
terminology you use, it's all a fairly easy to understand. In addition, by understanding the various options
and components of action strings, you'lll be able to create very powerful scipts to streamline your
workflow and minimize repetitive tasks. Let's get started!Action Strings
Whatever MicroStation does when you activate a tool, menu item or function key can be referred to as
an Action String. In other words, there is always some kind of keyin that executes a set of instructions
when one of these items is selected. A great example of an action string is the Fé function key which
toggles the display of construction elements on or off with this keyin: set construct toggle: selview all
update all where...
set construct toggle |s the actual command to turn the construction elements on or off
selview all Instructs MicroStation to apply the keyin to all views.
update all Updates all the views.
Function Keys: .
Fie
interfaces \fkeys\funckey.mnu
Shortt Keys
Pot Pat shit key Fey
Kev(sh 8
Curent: set constucttoaole: seiview al; update all
Sting
Fs dinsg cursor nextvindow
IF? plave lence
Fe set consiucttaggleseiew al update all
Fa date =I
Ex Delo ox Cancel_|
Action Types
There are a variety of action types associated with tools, view controls, menu items and function keys.
Note that some of these pre-date the current version of MicroStation and are shown with a (*)
yes/no question B
‘An un-terminated string of characters waits for the user to Fish
Unterminated Key-in kitkeyin]
the string,
Print Message
M,ER[message] Prints the message on the left side of the stat
M,sTImessage] Prints the message on the right side of the status bar in
MicroStation /3 and in the Message Center in MicroStation VB,
M,cFlmessace] Prints the message as the left side a MicroStation prompt
M,PRImessage] Prints the message as the right side of a MicroStation prompt,‘Sets the Active Cell to the specified cellname and activates the
Place Active Cell - Absolute ,feelIname]
Place Cell Absolute
‘Sets the Active Cell to the specified cellname and activates the
Place Active Cell - Relative Ry(cellname]
Place Cell Relative Kevin,
Tutorial (*) D,ftutoria Activates the specified tutorial
‘Activates user command defined in the user command Index file
User commane (*) vu,Luem_num’
for [uem_nura]
Primitive (*) P,{primitive] Activates keyin by Its IGDS primitive name
(7) MicroStation Pre-VB
‘A couple of things to point out with Action Types:
If no type is specified, then MicroStation assumes that it will be a command entry keyin (E).
For some terrific examples of action strings, take a look at the sample tablet menu in this file
.|workspace\system\menusldgn\vémenu.dgn. You'll want to navigate to the Command model and view
the Command Text level.
E.WINDOW AREA EXTENDED E,UPDATE VIEW EXTENDED
E,ZDOM IN EXTENDED E,MOVE UP O.gacy=0
E.MOVE LEFT 0.9:X¥-0 E,PAN VIEW
Action Type Options
In addition to the Action Types, there are several options which can be used following the E, T or K