jonathann3891 Posted December 10, 2015 Share Posted December 10, 2015 I have a custom dimension toolbar. I'm using this macro ^P^C^C(chklyr_desc "_gen_Dimn" "125" "continuous" "Dimensions" "p");_dimassoc;2;_dimlinear;'graphscr;\\\_-layer;s;!cl;; It works fine, but I cant right click to activate it again. If I do it activates the -layer command, leaving me to select an option. I've tried numerous times to solve the problem, but I cant seem to figure it out. I hope someone here can help me out. Thanks! Quote Link to comment Share on other sites More sharing options...
YZ Posted December 14, 2015 Share Posted December 14, 2015 Hey there Jonathan. Unfortunately the right click can only repeat the last command. This means even when you run a macro, AutoCAD sees it as a series of commands, and will only repeat the last one. With dimension macros, I put an "*" at the start of the macro to automatically repeat it until you right-click or hit escape. The star "*" sets up a loop of the whole macro, not just the last command. Just like this: *^P^C^C(chklyr_desc "_gen_Dimn" "125" "continuous" "Dimensions" "p");_dimassoc;2;_dimlinear;'graphscr;\\\_-layer;s;!cl;; Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 15, 2015 Share Posted December 15, 2015 As an additional note to what YZ has already said, using macro's from a toolpalette makes the macro independant. If you have the macro in the cui and from there use it in a menu, ribbon or toolbar then it can be accessed from the richt click menu Quote Link to comment Share on other sites More sharing options...
jonathann3891 Posted December 15, 2015 Author Share Posted December 15, 2015 Hey there Jonathan. Unfortunately the right click can only repeat the last command. This means even when you run a macro, AutoCAD sees it as a series of commands, and will only repeat the last one. With dimension macros, I put an "*" at the start of the macro to automatically repeat it until you right-click or hit escape. The star "*" sets up a loop of the whole macro, not just the last command. Just like this: *^P^C^C(chklyr_desc "_gen_Dimn" "125" "continuous" "Dimensions" "p");_dimassoc;2;_dimlinear;'graphscr;\\\_-layer;s;!cl;; I put the "*" at the start of the macro, but its not looping? Quote Link to comment Share on other sites More sharing options...
jonathann3891 Posted December 15, 2015 Author Share Posted December 15, 2015 As an additional note to what YZ has already said, using macro's from a toolpalette makes the macro independant. If you have the macro in the cui and from there use it in a menu, ribbon or toolbar then it can be accessed from the richt click menu I'm using CUI Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 15, 2015 Share Posted December 15, 2015 Unfortunately I cannot use LISP so no way to check your macro. What I would do in cases like this is reduce the macro to just a single command, and check that it works with the right click, and presuming it does then add back elements one piece at a time to see if you can find at which point it breaks. If it doesn't work for just a simple command then you would need to dig deeper. It might give someone else a clue if you could post a copy of your command line history from when you start the command and also when you try the right click. Quote Link to comment Share on other sites More sharing options...
YZ Posted December 16, 2015 Share Posted December 16, 2015 Sorry, I may have misled you. The "*" works in a macro, but I do not know how it behaves in a lisp function. steven-g, the right click will work if there is only one command in the macro, as soon as you put 2 or more, then the right click will only repeat the final command in the macro, not the preceding commands. Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 17, 2015 Share Posted December 17, 2015 YZ where is your macro, if it is a toolpalette then that is the behaviour you get, but if it is in the CUI and used in a menu etc, then it should show up as a named macro in the right click menu, unless there is a setting somewhere there it having an effect Quote Link to comment Share on other sites More sharing options...
YZ Posted December 22, 2015 Share Posted December 22, 2015 My macro is in the CUI in a custom button then in a ribbon panel. Perhaps the OP has it in there CUI in the right-click menu. I don't know. But if they are using lisp, then it is not really a macro that I am familiar enough with to comment on. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.