Dieselmenus from AutoCAD to BricsCAD

I'm just trying BricsCAD and ran into some problems to migrate my old menus to BricsCAD. I have some "Flyout-Menus" like the following:MENUGROUP=ISKDiversesPOP12[D&iverses][.&BKS]^C^C$P0=ISKDiverses.BKS1 $P0=***BKS1[BKS1][BKS -45°]^C^Cbks;w;bks;n;z;-45;[BKS &0°]^C^Cbks;w;[BKS &45°]^C^Cbks;w;bks;n;z;45;[BKS &90°]^C^Cbks;w;bks;n;z;90;[BKS (&Winkeleingabe)]^C^Cbks;w;bks;n;z;[BKS 3Punkte (mit Änderung z)]^C^Cbks;n;3p;In AcadLT i get a menuentry "Diverses" where i can click on "BKS" to get an selectionmenu. When i load this cui to BricsCAD i get two menus: One like in Acad and on called BKS1. Any suggestions to prevent this ? When i delete BKS1 in BricsCAD i get an error when clicking on "Diverses->BKS". Can i hide "BKS1" ?Another problem is: I'm using a lot of setenv/getenv in my macros. It seems, BricsCAD only has setvar/getvar. In Brics-Lisp (setenv "VAR" "VALUE") is supported, but i can only enter text not integer or real. Is there a workaround instead of tranfsorming setenv;abc;1.5 to setvar;userr1;1.5 or using lips ?Many thanksMathiasP.S.: Great program !

Comments

  • I will check the problem with (setenv) resp. (getenv) ... and will fix the issue, to provide full Acad compatibility.For the menu problem - if the related developer will not response in next time, I will send a notification ... as "flyouts" are important enough to correctly support them :-)Many thanks for your help,and many greetings

  • I just checked (setenv) and (getenv) ... original AutoLISP only supports string values, no integers or real; this is also documented in AutoLisp documentation.So we also need to exactly follow this syntax, otherwise we would introduce incompatibilities.But there is a workaround - you can convert integer and real values into strings before using (setenv) :(if (= (type val) 'INTEGER) (setenv "var" (itoa val)))(if (= (type val) 'REAL) (setenv "var" (rtos val 2 8))) ; decimal, 8 digits(if (= (type val) 'STRING) (setenv "var" val))If you read back the values, you cna convert back into integer resp. real values, depending on the variable's name or meaning.I hope this helps ?Many greetings

  • Hi Torsten,your right that you can't change the LISP-behaviour of setenv/getenv. But in AutoCAD setenv/getenv works in diesel, but not on BricsCAD (and i've used them a lot ...)MathiasP.S.: Was macht der Extender für LT2009+SP1 ? Ich vermisse ihn schon sehr !

  • Hello, Mathias,OK, I see ... so DIESEL should be able to accept INT/REAL values for setenv/getenv, and internally transform into strings ...I will send a notification to related developers ...Many greetingswish you a nice dayP.S. new LTE version with LT 2009 SP1 support is published this night - so on Friday you will have it :-)

  • Hello, Mathias,just forgotten to ask :when using DIESEL setenv;abc;1.5 it can be transformed internally into string ... no problem; but when reading with getenv;abc - what do you get in Acad : a String or a Real ??This might help our developers ...

  • Hi Torsten,i would say it returns a string that can be used for calculation:Example:[$(eval," Vortext (akt="$(getenv,VORTEXT))")"]^C^C_modemacro;.;setenv;VORTEXT;\Here i can enter text/number (for example A2C)[$(eval," Anfangswert (akt="$(getenv,WERT))")"]^C^C_modemacro;.;setenv;WERT;\Here i can enter the starting value (f.e. 3)[$(eval," Increment (akt="$(getenv,INC))")"]^C^C_modemacro;.;setenv;INC;\Here i can enter the increment (f.e. 0.5)*^C^C-mtext;\stil;standard;h;3;br;0;$m=$(getenv,VORTEXT)$(getenv,WERT);;"setenv;WERT;$m=$(+,$(getenv,WERT),$(getenv,INC));";This macro will give me the following texts:A2C3A2C3.5A2C4A2C4.5....You can see, that the value hasn't to be "stringed" to be inserted by the mtext-command, and the next value can be calculated by adding the increment without extra conversion.MathiasP.S.: Beautiful friday ;-)

  • I've just checked the behavior of Acad when loading a cui with a flyout-menu.First it looks the same like in Bricscadhttp://s7.directupload.net/file/d/1514/vcvc22c7_jpg.htmThe menu XR-Wicker is the flyout for Xref->Wicker. In Acad i can hide the menu XR-Wicker and everything ist ok. In Bricscad i havent found anything to hide this menu.Mathias

  • Now testing V9.3.13 - still the same problems !

    Mathias

  • In AutoCAD LT  i can type at the command line:

    Befehl: setenv
    * Environment Variable : massstab
    * Environment Data <500> : 100

    In BricsCAD i get:

    : setenv

    Der Befehl wurde nicht erkannt "setenv". Bitte versuchen Sie es erneut.

This discussion has been closed.