- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Assign two commands to one keyboard shortcut - can this be done?
Hi,
If it is possible, I would like to assign two commands to one keyboard shortcut. Specifically, I would like to have "save" + "close" combined.
Sometimes I cycle through a lot of drawings making small changes (e.g. updating a rev number on multiple drawings) and this would be handy to speed things up slightly.
BTW - the Rev is an attribute of a block, but I can't use Lee Mack's add in as the block has a different name on every sheet.
Cheers,
Keith.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi and Welcome to AutoCAD Forum,
You can do that and more , ACTRECORD command , You can use the Action Recorder to record commands and input as an action macro (ACTM) file. you can record a full procedure with many commands and start use it in other CAD files. if your Ribbon is active you can reach to this command from Manage tab . >> Click <<
All the best ...
Imad Habash
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Something as simple as this?
(defun C:SvC (); = Save and Close
(command "_.qsave" "_.close")
)
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
If you are opening multiple files at the same time, another option could be to utilize the right click menu from the drawing tabs. You can save all and close all.
Rob
Drafting is a breeze and Revit doesn't always work the way you think it should.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi @knICHOLSQQT72,
¡Welcome!
As recommended @imadHabash , the option is Action Recorder.
Open in the file on which you are going to run the commands that you want to record.
Once in the file, go to "ACTRECORD" and a red sphere will appear next to the cursor that tells you that you are recording.
You execute the commands that you need, in this case they are "SAVE" and then "CLOSE", however, when closing the file there is no way to stop the recording and assign a name to use it, so the best way to gain time in the process would be through lisp as it tells you @Kent1Cooper.
If you do not know how to program the routines, I recommend you try it with something simple like:
ACTRECORD (enter) to start recording
Zoom (enter)
E (enter)
Save (enter)
ACTSTOP (enter) to stop it
a window will open in which you will assign a name to the action, I think of something like WW and add a description that will help you to manage them later.
The name that you put to the action will be the one that you use as a command by keyboard, as tip I suggest you use short names and that they do not remain from end to end on the keyboard like PQ, because I understand that what you want is to save yourself a lot of clicks and time in repetitive processes. In addition, you must take into account not assigning any that exist as LA, since when invoked by keyboard you will be invoking LAYERS and not the action.
I would love to rehearse and tell us what has worked for you.
Regards,
Johanna Esteban
Autodesk Expert Elite | Autodesk Certified Professional | AutoCAD Customer Council (Beta Tester for Windows & Mac)
¿Te ha parecido útil este post? ¡Dame Kudos!
Si ha sido resuelta tu inquietud, selecciona 'Marcar como solución' para que otros usuarios la encuentren fácilmente.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Thanks,
As noted in another reply, this gets into a bind with the close command.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi,
Many thanks. This works when I load it, but it seems I need to load it every time I want to use it which defeats the purpose. I am assuming that there is a well known way to keep a lisp routine active?
When I saved the code as a lsp, the system plonked a bunch of stuff above the code you gave. I don't know if this is required or not, but here it is. I added a zoom extents command to keep things tidy.
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.16299}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9 (defun C:SvC (); = Save and Close\par
(command "zoom" "e")
(command "_.qsave" "_.close")\par
)\par
}
Keith
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi,
Thanks. That's a great tip as I did not know about that menu. It isn't exactly what I was looking for right now.
Keith
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Thanks Johanna,
That was a lovely and clear explanation. As you noted, the lsp routine is probably the way to go here as I need the close command.
Keith.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
@keithTZYB5 wrote:
.... I need to load it every time I want to use it which defeats the purpose. I am assuming that there is a well known way to keep a lisp routine active?
When I saved the code as a lsp, the system plonked a bunch of stuff ….
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.16299}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9 ….
Include it in your acaddoc.lsp file [or make one with only that in it if you don't have one -- save it to a location in the Support File Search Path list in OPTIONS], and it will be loaded in every drawing.
Did you paste it into something like a word-processor program, or go through Mtext or something, to save it to a .lsp file? That looks like font formatting. Do it in a plain-text editor such as Notepad, and you won't get that extraneous stuff.