Author Topic: Modemacro  (Read 9243 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 2081
Modemacro
« on: April 27, 2019, 10:00:31 AM »
Has anyone been able to display text on to the status bar, using modemacro?
Does BricsCAD have this function?
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: Modemacro
« Reply #1 on: April 27, 2019, 10:07:09 PM »
works at the command line

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Modemacro
« Reply #2 on: April 28, 2019, 03:30:43 AM »
Seems to work OK. But I do notice that the text does not update when hovering over certain GUI elements. For example while running the code below and hitting the ESNAP button in the Status Bar.
Code - Auto/Visual Lisp: [Select]
  1. (setvar "MODEMACRO"
  2.   (strcat
  3.     "$(if,$(=,$(getvar,OSMODE),0),** OSNAPS OFF ** ,)"
  4.     "$(if,$(=,$(and,$(getvar,OSMODE),    1),0),,END )"
  5.     "$(if,$(=,$(and,$(getvar,OSMODE),    2),0),,MID )"
  6.     "$(if,$(=,$(and,$(getvar,OSMODE),    4),0),,CEN )"
  7.     "$(if,$(=,$(and,$(getvar,OSMODE),    8),0),,NOD )"
  8.     "$(if,$(=,$(and,$(getvar,OSMODE),   16),0),,QUA )"
  9.     "$(if,$(=,$(and,$(getvar,OSMODE),   32),0),,INT )"
  10.     "$(if,$(=,$(and,$(getvar,OSMODE),   64),0),,INS )"
  11.     "$(if,$(=,$(and,$(getvar,OSMODE),  128),0),,PER )"
  12.     "$(if,$(=,$(and,$(getvar,OSMODE),  256),0),,TAN )"
  13.     "$(if,$(=,$(and,$(getvar,OSMODE),  512),0),,NEA )"
  14.     "$(if,$(=,$(and,$(getvar,OSMODE), 1024),0),,GCE )"
  15.     "$(if,$(=,$(and,$(getvar,OSMODE), 2048),0),,APP )"
  16.     "$(if,$(=,$(and,$(getvar,OSMODE), 4096),0),,EXT )"
  17.     "$(if,$(=,$(and,$(getvar,OSMODE), 8192),0),,PAR )"
  18.     "$(if,$(=,$(and,$(getvar,OSMODE),16384),0),,** OSNAPS OFF ** )"
  19.   )
  20. )
« Last Edit: April 28, 2019, 03:37:30 AM by roy_043 »

GDF

  • Water Moccasin
  • Posts: 2081
Re: Modemacro
« Reply #3 on: April 28, 2019, 07:28:33 AM »
Thanks Daniel and Roy
« Last Edit: April 28, 2019, 08:00:35 AM by GDF »
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Modemacro
« Reply #4 on: April 30, 2019, 02:07:37 PM »
Part of my problem was that I had the status bar toggled off.
 :idiot2:
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

ScottMC

  • Newt
  • Posts: 191
Re: Modemacro
« Reply #5 on: December 19, 2021, 06:00:03 PM »
Just wondering if others using this macro have seen a similar difficulty. when adding more to this, my A2K crashes [0x0004] still it's helpful. One change I use is adding the "!" to inverse and make it shorter exp:
[ "$(if,$(!=,$(and,$(getvar,OSMODE),    1),0),,END )" ]