TheSwamp

CAD Forums => CAD General => BricsCAD Users => Topic started by: GDF on April 27, 2019, 10:00:31 AM

Title: Modemacro
Post by: GDF 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?
Title: Re: Modemacro
Post by: It's Alive! on April 27, 2019, 10:07:09 PM
works at the command line
Title: Re: Modemacro
Post by: roy_043 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. )
Title: Re: Modemacro
Post by: GDF on April 28, 2019, 07:28:33 AM
Thanks Daniel and Roy
Title: Re: Modemacro
Post by: GDF on April 30, 2019, 02:07:37 PM
Part of my problem was that I had the status bar toggled off.
 :idiot2:
Title: Re: Modemacro
Post by: ScottMC 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 )" ]