Over 1.099.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
Try the new precise Engineering calculator.
New AutoCAD 2026 commands and variables.
Discussion forum
?CAD discussions, advices, exchange of experience

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
|
Post Reply ![]() |
Author | |
SONGS ![]() Newbie ![]() Joined: 18.Apr.2008 Status: Offline Points: 16 |
![]() Posted: 02.May.2008 at 18:06 |
Hi again. If the help files were more helpful I wouldn't keep asking you nice folks so many questions.
I'm using AutoCAD 2007. I would like to Record a macro but there doesn't seem to be that option. (I see I can write my own however.)
So in lieu of that Id like to create a couple of keyboard shortcuts.
One, I'd like to set Ctrl+W to do the following menu choices:
go to Tools\Named UCS... then select World, choose Set Current, click OK. Then go to menu View\3D Views\Plan View\Current UCS
And 2, I'd like Ctrl+Shift+W to go to:
Tools\Named UCS... select Called North View, choose Set Current, click OK. Then go to menu View\3D Views\Plan View\Current UCS
Problem is that I don't know how to write the code properly in the Tools\Customize\Interface box to make it work.
Any suggestions?
Thanks.
|
|
![]() |
|
Vladimir Michl ![]() Moderator Group ![]() Arkance Systems CZ Joined: 26.Jul.2007 Location: Czech Republic Using: Autodesk software Status: Offline Points: 2124 |
![]() |
The "macro recorder" function was introduced in AutoCAD 2009. You can assign almost any keyboard shortcut to a user macro. The macro can be defined exactly the same way as you type the command and its options on the commandline - e.g. _UCS _World |
|
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner |
|
![]() |
|
SONGS ![]() Newbie ![]() Joined: 18.Apr.2008 Status: Offline Points: 16 |
![]() |
I've tried that. It tells me it's an unknown command in the macro mode. On the command line it works but only shifts the X-Y axis lines, it doesn't change the view of the map.
The way I wrote the steps in the first note is what I normally have to do to change views. It's a bit cumbersome hence my reason for wanting a shortcut.
|
|
![]() |
|
SONGS ![]() Newbie ![]() Joined: 18.Apr.2008 Status: Offline Points: 16 |
![]() |
Is there somewhere in the help files where it tells the syntax of writing a macro? And the allowed codes and commands used in a macro?
|
|
![]() |
|
Vladimir Michl ![]() Moderator Group ![]() Arkance Systems CZ Joined: 26.Jul.2007 Location: Czech Republic Using: Autodesk software Status: Offline Points: 2124 |
![]() |
A macro is just a plain string of the same characters you would type in the command line. No special codes, no special commands.
|
|
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner |
|
![]() |
|
RichardBlank ![]() Newbie ![]() Joined: 02.May.2008 Location: United States Status: Offline Points: 2 |
![]() |
Thank you for the helpful information Vladimir . I was having issues as well.
Richard
.
|
|
Richard Blank
CEO Costa Rica’s Call Center ceo@costaricascallcenter.com www.costaricascallcenter.com 888-271-6750 |
|
![]() |
|
SONGS ![]() Newbie ![]() Joined: 18.Apr.2008 Status: Offline Points: 16 |
![]() |
Ok, but I've seen that things like semicolons mean the code does one thing while a backslash does another and a colon does yet another. So it seems there might be more than just "a plain string of the same characters you would type in the command line. No special codes, no special commands" that one must know. There are things that you can do that I can't find in the help files. (I know, it's silly of me to think the help files are there to actually help.
![]() And some things I can do from the keyboard don't seem to work all the way in a macro. For example, here's a bit of code that works part-way:
^C^C_ucsman 0;alt+V;alt+3;alt+P;alt+C;
It seems to work ok until it gets to alt+C, then it says alt+C is an unknown command. Alt+V is the View menu, alt+3 is the 3D Views option, alt+P is the Plan View option and alt+C is the Current UCS option. It all works from the keyboard but not the macro. And I'm assuming the ";" means Enter?
And while the above code is shorter than doing it all manually, I'd still like to find a way to automate the input from the _ucsman 0 box also. I do a lot of switching between 'World view' and our 'Called Plant North' view. So if I could do it all from one keyboard shortcut, like Ctrl+Shift+W, it would save a lot of time.
Thanks again for any input.
|
|
![]() |
|
Vladimir Michl ![]() Moderator Group ![]() Arkance Systems CZ Joined: 26.Jul.2007 Location: Czech Republic Using: Autodesk software Status: Offline Points: 2124 |
![]() |
For plain command sequences it is like that - no special commands, no special codes. As an added value, you might replace <ENTER> by ";" and you can break the macro execution with "\" to wait for user input. And yes - in those rare situations where you would use a Ctrl-key combination in AutoCAD, you type "^" in macros (e.g. ^C).
Plus there is a macro language called Diesel where you can use conditional statements, simple string and arithmetic operations, etc.
|
|
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner |
|
![]() |
|
SONGS ![]() Newbie ![]() Joined: 18.Apr.2008 Status: Offline Points: 16 |
![]() |
Ah, I see. I guess the only other thing then is, can you tell me why, in the code
^C^C_ucsman 0;alt+V;alt+3;alt+P;alt+C; the alt+C doesn't work? The rest seems to work but not that. TIA |
|
![]() |
|
Vladimir Michl ![]() Moderator Group ![]() Arkance Systems CZ Joined: 26.Jul.2007 Location: Czech Republic Using: Autodesk software Status: Offline Points: 2124 |
![]() |
"alt+C" is nothing more than "a", "l", "t", "+" and "C" keys as typed... You cannot control dialogs from menu macros. |
|
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,145 seconds.