Wednesday, December 7, 2011

Using AutoCAD shortcuts in MicroStation

The acad.pgp file is a text file used by AutoCAD for shortcuts to certain internal and

external commands. (PGP stands for Program Parameters.) MicroStation can also use

these shortcuts…

For AutoCAD users who have crossed over to MicroStation, the lack of keyboard shortcuts

can be frustrating. What else is there for their left hand to do all day…?! What many

people do not realise is that MicroStation is capable of supporting the acad.pgp (program

parameters) file.

To load a PGP

By default MicroStation is set to look for a file called acad.pgp in the AutoCAD "Support"

folder - if you have it installed. You can define an alternative location using the

MS_DWG_PGPFILE variable. E.g.

MS_DWG_PGPFILE = $(_USTN_SITE)data/acad.pgp

Loads acad.pgp from the Workspace\Standards\data folder; useful if you wish to provide

standard shortcuts to all your users.

Of course you could let each user have their own .pgp file so that they can define their own

shortcuts. You can be quite clever with configs. The example below checks if a user has a

personal .pgp in their Prefs folder. If there is, MicroStation will load that, if not it will load

the office standard from Workspace\Standards\Data:

%if exists ($(_USTN_HOMEPREFS)acad.pgp)

MS_DWG_PGPFILE = $(_USTN_HOMEPREFS)acad.pgp

%else

MS_DWG_PGPFILE = $(_USTN_SITE)data/acad.pgp

%endif

MicroStation commands in a PGP

Only certain AutoCAD commands are supported in MicroStation. You can get a full list

from the MicroStation Help file (search for Supported AutoCAD key-ins) but it doesn't

really help an experienced AutoCAD user too much when all they get from MicroStation is

"Unknown Command or Keyin" for everyday commands like "DS" (Drafting Settings) or

"PR" (Properties).

What you can do is use MicroStation shortcuts in the PGP. This allows you to set the

closest MicroStation equivalent to the AutoCAD shortcut, but also means a MicroStation

user can use this to define their own keyboard shortcuts whether they know anything

about AutoCAD or not. (It means people can leave the AccuDraw shortcuts.txt alone so

standard commands like D for Lock Distance don't become Place Dimension - most

irritating when you're trying to teach!)

To define a command, open the PGP file in Notepad or Wordpad and type in the shortcut

you wish to use followed by a comma. We'll use "PR" to open the Element Information

(Properties) dialogue as an example. Then enter the MicroStation command in speech

marks:

PR, "element info dialog init"

The spaces aren't important, they just help to read the file later.

PR is a standard AutoCAD shortcut, but as mentioned, you could define your own:

ADT, "accudraw dialog toggle"

This will open and close the AccuDraw window.

To help you out we've created a default PGP file with all of the standard AutoCAD

shortcuts delivered with AutoCAD 2007 redefined for MicroStation XM. Download the

acad.pgp file from the DOWNLOADS section of this page, save it to your PC or workspace

and set MS_DWG_PGPFILE to load it.

Running a PGP command

To run a PGP command in MicroStation you need to first tell MicroStation to read from that

file. You do that on the command line using "\" followed by the keyin:

\PR

will open the

No comments:

Post a Comment