I am trying to get a DIESEL menu macro working. I need a different macro to run based on the value of useri1.
Generally all my DIESEL logic works with simple code:
^C^C$M=$(if,$(=,$(getvar,useri1),3),"**CODE_FOR_3**",$(if,$(or,$(=,$(getvar,useri1),1),$(=,$(getvar,useri1),2)),"**CODE_FOR_1_&_2**"))^C^C
Also my actual code for useri1=1 or useri1=2 works without DIESEL:
^C^CERASE W 10.610,7.8923 0.4490,11.3923;;^C^C
However, it doesn't work when I put that code into the DIESEL macro (not forgetting that I need quotes):
^C^C$M=$(if,$(=,$(getvar,useri1),3),"**CODE_FOR_3**",$(if,$(or,$(=,$(getvar,useri1),1),$(=,$(getvar,useri1),2)),"ERASE W 10.610,7.8923 0.4490,11.3923;;"))^C^C
The comma seems to terminate the DIESEL output after the first comma it finds in the code string. I thought that DIESEL was supposed to allow commas as part of a string as long as they were contained in quotes. My code with commas is contained in quotes, yet the macro that AutoCAD sees is something like this:
^C^CERASE W 10.610^C^C
Please do not get into picky comments about what I'm actually trying to do. Erasing a windowed box is only an example that demonstrates my comma problem. Any examples of other ways to accomplish this without using commas, or a fix to my syntax that gets my commas working is what I'm looking for. I'm in LT so AutoLISP or VBA are not options.
Using AutoCAD LT 2010 on Windows XP SP3, if that helps.
Thanks