TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: dussla on September 11, 2010, 12:55:05 AM
-
hi
firends
i excute 2 cad app in common.
i would like to save first cad app variable .
and i would like to use that variable in second cad app.
so i use register
how can i do that ?
good day , good luck all friends
-
try this, it does save in registry:
Command: (setenv "yourvar" "test")
"test"
Command: (getenv "yourvar")
"test"
-
Setenv works fine but can only handle strings. Using vl-registry-read and vl-registry-write you can also write numbers and you have more control over the registry structure.
Of course if your apps only have to communicate within the same drawing you can just set a global variable. If you want them to communicate between drawings but in the same Acad session you can use vl-bb-ref and vl-bb-set.
-
I use this http://www.theswamp.org/index.php?topic=28286.0 I hate the registry :-)
-
Setenv works fine but can only handle strings. Using vl-registry-read and vl-registry-write you can also write numbers and you have more control over the registry structure.
Of course if your apps only have to communicate within the same drawing you can just set a global variable. If you want them to communicate between drawings but in the same Acad session you can use vl-bb-ref and vl-bb-set.
There are functions to handle the conversion. Don't think of this as a deterrent ;-)
-
thank you good answer~