Today’s post is one that I’m shocked I haven’t written already. A while back I was pondering how to load my shortcuts for P&ID and not for plant. I tend to have a complicated setup since I use CADWorx, but also have to teach/demo CADWorx. Personally, I like the ribbons, but the bulk of my command entry is done via left-hand keyboard shortcuts. I have a bunch of shortcuts for AutoCAD functions, and some that pertain to CADWorx P&ID, and some that I want to use with Plant. Here’s what I decided to do:
1. Store all my generic AutoCAD shortcuts in my pgp file. When I’m in “personal” mode (not demo-ing or training) I have access to these since my pgp is loaded from my profile settings.
2. Store my CADWorx P&ID and Plant shortcuts in separate lisp files. Here’s a clip of my P&ID Shortcuts.
The final piece of magic is done my a routine that check’s to see if a particular .arx file is loaded.
(defun checkarx (progplusstar)
(setq blfound nil)
(foreach arxfile listarxs
(wcmatch arxfile progplusstar)(progn (setq blfound T )(setq foundarx arxfile))
(setq blreturn blfound)
To use the routine, use lisp like the following:
;check to see if there is an arx whose name starts with cadworxp&id
(if (checkarx "cadworxp&id*");do some action here
And that’s all there is to it!