Author Topic: Replicate status bar TEXT not icons - autocad 2015/2016  (Read 20421 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #15 on: May 09, 2015, 02:52:25 PM »
Another solution, if you have Express Tools:

Code - Auto/Visual Lisp: [Select]
  1. (defun status-text-callback ( rtr arg / str )
  2.     (if
  3.         (member (strcase (car arg) t)
  4.            '(
  5.                 "constraintinfer"
  6.                 "snapmode"
  7.                 "gridmode"
  8.                 "orthomode"
  9.                 "autosnap"
  10.                 "osmode"
  11.                 "3dosmode"
  12.                 "ucsdetect"
  13.                 "dynmode"
  14.                 "lwdisplay"
  15.                 "transparencydisplay"
  16.                 "qpmode"
  17.                 "selectioncycling"
  18.                 "annomonitor"
  19.             )
  20.         )
  21.         (if
  22.             (= ""
  23.                 (setq str
  24.                     (vl-string-trim " "
  25.                         (apply 'strcat
  26.                             (mapcar '(lambda ( x ) (apply '(lambda ( a b c ) (if (and b (a b)) c "")) x))
  27.                                 (list
  28.                                     (list (lambda ( x ) (= 01 x))                (getvar 'constraintinfer)    " [INFER] ")
  29.                                     (list (lambda ( x ) (= 01 x))                (getvar 'snapmode)            " [SNAP] ")
  30.                                     (list (lambda ( x ) (= 01 x))                (getvar 'gridmode)            " [GRID] ")
  31.                                     (list (lambda ( x ) (= 01 x))                (getvar 'orthomode)          " [ORTHO] ")
  32.                                     (list (lambda ( x ) (= 08 (logand 00008 x))) (getvar 'autosnap)           " [POLAR] ")
  33.                                     (list (lambda ( x ) (= 00 (logand 16384 x))) (getvar 'osmode)             " [OSNAP] ")
  34.                                     (list (lambda ( x ) (= 00 (logand 00001 x))) (getvar '3dosmode)         " [3DOSNAP] ")
  35.                                     (list (lambda ( x ) (= 16 (logand 00016 x))) (getvar 'autosnap)          " [OTRACK] ")
  36.                                     (list (lambda ( x ) (= 01 x))                (getvar 'ucsdetect)           " [DUCS] ")
  37.                                     (list (lambda ( x ) (< 00 x))                (getvar 'dynmode)              " [DYN] ")
  38.                                     (list (lambda ( x ) (= 01 x))                (getvar 'lwdisplay)            " [LWT] ")
  39.                                     (list (lambda ( x ) (= 01 x))                (getvar 'transparencydisplay)  " [TPY] ")
  40.                                     (list (lambda ( x ) (< 00 x))                (getvar 'qpmode)                " [QP] ")
  41.                                     (list (lambda ( x ) (< 00 x))                (getvar 'selectioncycling)      " [SC] ")
  42.                                     (list (lambda ( x ) (< 00 x))                (getvar 'annomonitor)           " [AM] ")
  43.                                 )
  44.                             )
  45.                         )
  46.                     )
  47.                 )
  48.             )
  49.             (acet-ui-status)
  50.             (acet-ui-status str "Text Status Bar")
  51.         )
  52.     )
  53.     (princ)
  54. )
  55. (
  56.     (lambda nil
  57.         (vl-load-com)
  58.             (if (= "status-text-reactor" (vlr-data obj))
  59.                 (vlr-remove obj)
  60.             )
  61.         )
  62.         (setq status-text-reactor
  63.             (vlr-sysvar-reactor "status-text-reactor"
  64.                '(
  65.                     (:vlr-sysvarchanged . status-text-callback)
  66.                 )
  67.             )
  68.         )
  69.         (status-text-callback nil '("osmode"))
  70.     )
  71. )

kruuger

  • Swamp Rat
  • Posts: 625
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #16 on: May 09, 2015, 03:56:06 PM »
An alternative solution:

Code: [Select]
(setvar 'modemacro "$(if,$(=,$(getvar,gridmode),1),\"GRID | \",\"\")$(if,$(<,$(getvar,osmode),16384),\"OSNAP | \",\"\")$(if,$(=,$(getvar,orthomode),1),\"ORTHO | \",\"\")")
nice but already got some info there. also modemacro was affected but stupid status bar changes.
not sure if you was able to try 2015/2016 but when switching between model and paper macro line flickering  left/right/left/right back and forth. it is really annoying.

Another solution, if you have Express Tools:
:)  well done. will play with your version, finish my button variant and see which one is more comfortable.

thanks

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #17 on: May 09, 2015, 06:04:51 PM »
An alternative solution:
Code: [Select]
(setvar 'modemacro "$(if,$(=,$(getvar,gridmode),1),\"GRID | \",\"\")$(if,$(<,$(getvar,osmode),16384),\"OSNAP | \",\"\")$(if,$(=,$(getvar,orthomode),1),\"ORTHO | \",\"\")")
nice but already got some info there. also modemacro was affected but stupid status bar changes.
not sure if you was able to try 2015/2016 but when switching between model and paper macro line flickering  left/right/left/right back and forth. it is really annoying.

I agree, this solution was not ideal - I was mainly trying to offer something different  :-)

Another solution, if you have Express Tools:
:)  well done. will play with your version, finish my button variant and see which one is more comfortable.

thanks

Thanks kruuger  :-)

Presumably your solution is modal since you are using DCL?

Or are you using OpenDCL to display the buttons using a modeless dialog?

kruuger

  • Swamp Rat
  • Posts: 625
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #18 on: May 09, 2015, 06:33:42 PM »
Presumably your solution is modal since you are using DCL?

Or are you using OpenDCL to display the buttons using a modeless dialog?
now dcl. little rusty in opendcl. will see how it works.
thanks for last code. it is big help.
kruuger

trogg

  • Bull Frog
  • Posts: 255
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #19 on: May 09, 2015, 10:47:33 PM »
Another solution, if you have Express Tools:

Lee,
By accident, after loading in your lisp (which is cool BTW) I did a left click hold and drag "Lasso" selection and it triggers this LISP to pop up. What is making it do that?

Is there a system variable that changes while a lasso selection happens?

Thanks
~Greg

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #20 on: May 10, 2015, 06:12:35 AM »
Presumably your solution is modal since you are using DCL?

Or are you using OpenDCL to display the buttons using a modeless dialog?
now dcl. little rusty in opendcl. will see how it works.
thanks for last code. it is big help.
kruuger

You're most welcome kruuger  :-)

Another solution, if you have Express Tools:
By accident, after loading in your lisp (which is cool BTW) I did a left click hold and drag "Lasso" selection and it triggers this LISP to pop up. What is making it do that?

Is there a system variable that changes while a lasso selection happens?

I can't seem to replicate this behaviour: with all of the monitored system variables disabled (and hence the dialog not displayed), the dialog does not then appear when a Lasso selection is invoked; similarly, with one or more system variables enabled but with the dialog closed manually, the dialog does not then re-appear when a Lasso selection is used in my testing.

You can monitor which system variable is changing by adding (princ arg) on a new line between lines 52 & 53.

Aside, note that since acet-ui-status displays a modeless dialog, the dialog may remain open continuously during the drawing session.

I'm glad you like the code Greg  :-)

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #21 on: May 10, 2015, 07:25:34 AM »
Attached is another possible solution  :-)

kruuger

  • Swamp Rat
  • Posts: 625
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #22 on: May 11, 2015, 07:28:02 AM »
You could look at AcadStatButton.zip in the freebies section at manusoft.com.  Not sure if it works with the latest Autocad but I used it successfully with Autocad before I switched to Bricscad a few years ago.
thanks hmspe. i'm not familiar with C++ but i will look at this.
kruuger
« Last Edit: May 11, 2015, 08:10:48 AM by kruuger »

kruuger

  • Swamp Rat
  • Posts: 625
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #23 on: May 11, 2015, 07:42:11 AM »
Attached is another possible solution  :)
i kneew it, there will be dynamic draw version :)
really nice !!!
kruuger






Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #24 on: May 11, 2015, 07:53:47 AM »
Attached is another possible solution  :)
i kneew it, there will be dynamic draw version :)
really nice !!!
kruuger

I thought you in particular might like it  :wink:

Thanks kruuger :-)

ChrisCarlson

  • Guest
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #25 on: May 11, 2015, 10:51:10 AM »
Code - Auto/Visual Lisp: [Select]
  1. (:vlr-sysvarchanged . status-text-callback)

Set's it to run anytime a sysvar is changed, do you know why pan/zoom via mouse (which changes the viewsize sysvar if done through cmd line) does not trigger any known reactors?

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #26 on: May 11, 2015, 12:03:03 PM »
Code - Auto/Visual Lisp: [Select]
  1. (:vlr-sysvarchanged . status-text-callback)

Set's it to run anytime a sysvar is changed, do you know why pan/zoom via mouse (which changes the viewsize sysvar if done through cmd line) does not trigger any known reactors?

Indeed - the :vlr-sysvarchanged event is triggered for most but not every system variable - this is unfortunately how it was implemented.

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #27 on: May 11, 2015, 02:06:38 PM »
Yes Lee is right, this might be of interest...

http://www.theswamp.org/index.php?topic=49063.0

http://www.theswamp.org/index.php?topic=49065.0

Unfortunately, recently I wanted to acquire DI command with transparent REGEN and I didn't find solution yet...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #28 on: May 12, 2015, 12:16:04 AM »
Ha, it seems that I've found solution that is general for transparent REGEN... It's this : when you reach maximum zoom level or pan level, you just enter 3DORBIT transparently like this _'3DO, and after that you just hit ENTER... REGEN command will be initiated and you can continue to pan or zoom... Good trick...

HTH, M.R.
 :lol:
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ChrisCarlson

  • Guest
Re: Replicate status bar TEXT not icons - autocad 2015/2016
« Reply #29 on: May 12, 2015, 07:18:37 AM »
Not entirely, as the :vlr-command* will fire on "_'3DO" not the change in viewctr