Setting up lettered keys to perform commands like autocad?
New here. I'm sure this has been asked but can't seem to find a thread answering this specifically. Can you setup "key D" to do the autocad command "Draw"? Can you setup a 2 key combo like "CC" to do a specific command like "Circle"? Thank you
Comments
-
Yes. Pull down Tools > Customize, and select the Command Aliases tab.
0 -
But only for the traditional tools that Autocad uses - aliases not available for the Brics-only tools like all the Direct Modeling ones. A drag - can't think why.
0 -
If you like CommandLine entry, you will most likely gravitate to LISP routines; like command aliases on steroids.
As an example, to toggle back & forth between Model Tab & Layout Tab (Tilemode 1 or 0):;T1T0.lsp (filename)
;TILEMODE QUICK TOGGLES
;(BricsCAD) WORKING: 3:58 PM 7/2/2019
;(AutoCAD) WORKING: 3:39 PM 11/2/2015
;12:43 PM 5/15/2018 (BricsCAD)
;1 = Model Tab
;0 = Layout1 Tab
(defun c:1 ()(command "tilemode" "1")
(command "regen")(princ))
(defun c:0 ()(command "tilemode" "0")
(command "regen")(princ))If you create a *.txt file & rename it T1T0.lsp & copy the above text into it & Appload it, 1 or 0 at the Commandline will toggle Model or Layout1 Tabs.
Everything to the right of a semi colon (;) is considered notes.0 -
Tom: I just have Classic, so I didn't know that you can't make aliases for the Direct Modeling commands. But does MDunn's idea solve that for you?
For example, to make D an alias for the Donut command, you could create a custom command called D that does exactly the same thing as the built-in Donut command:
(defun c:D () (command "Donut") (while (> (getvar "cmdactive") 0) (command pause)) )
But I don't know whether you can use a Direct Modeling command in a lisp function in the same way that I used the Donut command. Have you tried that?
0 -
No, not gone there (Lisp etc) yet.
Much easier is Keyboard Shortcuts, item 10 in
https://help.bricsys.com/hc/en-us/articles/360006433954-Creating-custom-tools
Haven't tried that yet either.0 -
Tom,
the list of commands shown in the right side panel of the Command Aliases tab is not complete, it only shows BricsCAD native commands.
This list is shown for convenience, but apparently it gives the wrong impression that you are restricted to using only those,
while in fact, in the Command field of the Add Alias dialog you can type any text you want, including names of non-existing commands which will yield errors every time you use such shortcut.0 -
Brian77,
Command Aliases are located in the default.pgp file.
Search for default.pgp, looking for the path that includes:
…\AppData\Roaming...
The key is to look for the *.pgp file w/ “\Roaming\” in the path.
Don’t be fooled, because there is a default.pgp file in the C:\Program Files\ folder; use the one in the C:\Users\ folder.
As a suggestion, make a copy of the original file & name it .ORIGINAL for archival purposes in case you need to revert to the original PGP file (for some strange reason).The default command alias for CIRCLE is C & in the PGP file, it looks like this:
C, *CIRCLE
To edit using your example it would look like this:
CC, *CIRCLEClose & save the file.
In BricsCAD, REINIT to reinitiate the updated PGP file.
Also, any other command you would like to create an alias for can be done here. Just use the shown format of:
Alias, *BricsCAD command name
As an example, here is a couple I have added:
CB, *COPYBASE
RFC, *REFCLOSE
RFE, *REFEDITHope this helps,
Mike0