Aftertouch Posted December 8, 2016 Share Posted December 8, 2016 Hello all, I have build my own ribbon, but i experience a problem. I have a button in my ribbon that shows the text: STATUS: $(substr,$(getvar,USERS1),1,1) When i start a drawing, the ribbon updates to the text as it should. BUT... When i change the value of USERS1, it does not change in the ribbon.... how can i solve this??? I want that text to by dynamic to the USERS1. also... Is it possible to let a buton look 'pressed' depending on a variable? Like... when filedia = 1 i want a button to look 'pressed/highlighted' and when its 0 it looks regular. Quote Link to comment Share on other sites More sharing options...
Aftertouch Posted December 14, 2016 Author Share Posted December 14, 2016 Nobody has the awnser? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 15, 2016 Share Posted December 15, 2016 What happens with ribbonclose then ribbon. Quote Link to comment Share on other sites More sharing options...
Aftertouch Posted December 15, 2016 Author Share Posted December 15, 2016 Does not work. The only thing that works is when i do WSCURRENT. then it 'reload' everything with the right settings. But due to our drawingsystem, this variable can change a few times per minute, so i want it to by dynamic. :-) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 16, 2016 Share Posted December 16, 2016 Try this it works ; test (setvar "modemacro" "BIG_AL here") ;yours (setvar "modemacro" (getvar "USERS1")) ; add to code wherever setvar users1 Quote Link to comment Share on other sites More sharing options...
YZ Posted December 19, 2016 Share Posted December 19, 2016 In my experience with DIESEL and Macros, there is a delay from setting a variable to it being available for use. For example if you set a variable in a macro and attempt to use it in that same macro, it will not use the new value, but the old value. I'd expect that the issue you are experiencing is the same. Great work with the DIESEL though, that is a great idea of pushing the boundaries! I hope you can get something to work. Quote Link to comment Share on other sites More sharing options...
tombu Posted December 21, 2016 Share Posted December 21, 2016 Besides Modemacro which I've used for many years I added a flyout to the "Object Snap Cursor Menu" Shortcut Menu named $(eval,OSNAP = $(if,$(and,16384,$(getvar,osmode)),"Off","On")) that has a lot of macros that toggle system variables that update their display automatically. I was never able to do the same in the Ribbon. This one displays whether or not you can snap to Hatch objects: Display Name: $(if,$(and,1,$(getvar,osnaphatch)),!.)Hatch Command Name: Hatch Description: Snap to Hatch Objects Macro: ^P'setvar;osoptions;$M=$(if,$(and,1,$(getvar,osoptions)),$(-,$(getvar,osoptions),1),$(+,$(getvar,osoptions),1)) ^P HTH 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.