tombu Posted August 25, 2015 Share Posted August 25, 2015 I got it working. Thank you for the help tombu. I am so new to lisp, what is the difference between a typical variable and a local variable? They're called out in the defun function. See: http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-5269529D-A013-4AB4-AAB7-DBA1C7CA73EB Quote Link to comment Share on other sites More sharing options...
tombu Posted August 25, 2015 Share Posted August 25, 2015 This doesn't seem to work for me. It always reads as Elev = 0 even if I change the elevation. Is it supposed to dynamically change? It will not work as the command name, only as the display name after adding it to a menu or ribbon. Quote Link to comment Share on other sites More sharing options...
iconeo Posted August 25, 2015 Share Posted August 25, 2015 It will not work as the command name, only as the display name after adding it to a menu or ribbon. Yea, that is the way I have it setup. It just doesn't ever change from elev=0 even when I change it. Quote Link to comment Share on other sites More sharing options...
broncos15 Posted August 25, 2015 Author Share Posted August 25, 2015 They're called out in the defun function. See: http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-5269529D-A013-4AB4-AAB7-DBA1C7CA73EB Thanks, that is super useful to know. Unfortunately, the command is still setting osnapz to 1, even though it was originally set at 0. It's not a huge deal, I might just have to let people know about it. Quote Link to comment Share on other sites More sharing options...
tombu Posted August 25, 2015 Share Posted August 25, 2015 Yea, that is the way I have it setup. It just doesn't ever change from elev=0 even when I change it. With ELEVATION set to 12.34 and OSNAPZ set to 1 the toggle in my flyout added to my "&Object Snap Cursor Menu" displays Elev = 12.34 Toggle and it displays Elev = Snap The display name is for display only the macro toggles OSNAPZ. Can you attach an image of the menu command properties? Couple more examples: For switching between Relative and Absolute Coordinate Input ^P(ai_onoff "dynpicoords") ^P with $(eval,Dynamic Input Coordinate = $(if,$(=,$(getvar,dynpicoords),0),"Relative","Absolute")) as the display name. To "Toggle Group Selection Mode" ^A with $(if,$(and,1,$(getvar,pickstyle)),!.)Group as the display name. I use 'setvar;osmode;$M=$(if,$(and,2125,$(getvar,osmode)),0,2125) to Toggle my default osmode. with $(if,$(=,2125,$(getvar,osmode)),!.)ECNInsApp as the display name. The flyout added to my "&Object Snap Cursor Menu" is $(eval,OSNAP = $(if,$(and,16384,$(getvar,osmode)),"Off","On")) Quote Link to comment Share on other sites More sharing options...
iconeo Posted August 25, 2015 Share Posted August 25, 2015 Does it not work properly in the RIBBON? I gets the initial value right but won't update upon a change. Thanks. Quote Link to comment Share on other sites More sharing options...
tombu Posted August 25, 2015 Share Posted August 25, 2015 Sorry, toggles that display highlighted when on like ^P(ai_onoff "mbuttonpan") ^P with a display name of $(if,$(getvar,mbuttonpan),!.)MidButPan work fine in the Ribbon. Toggles that display text have issues trying to display correctly in the Ribbon. The problem is the Ribbon isn't being refreshed, if you switch Workspaces each time it will display correctly. Shortcut menus which I use a lot are refreshed instantly. Something like $(if,$(getvar,osnapz),!.)Osnap→Elev for the display name should work. Quote Link to comment Share on other sites More sharing options...
iconeo Posted August 25, 2015 Share Posted August 25, 2015 Good to know. Thanks Tombu 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.