Author Topic: set or get variables in register  (Read 3294 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 291
set or get variables in register
« 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



danallen

  • Guest
Re: set or get variables in register
« Reply #1 on: September 11, 2010, 01:11:01 AM »
try this, it does save in registry:
Command: (setenv "yourvar" "test")
"test"

Command: (getenv "yourvar")
"test"

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: set or get variables in register
« Reply #2 on: September 11, 2010, 05:12:57 AM »
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.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: set or get variables in register
« Reply #3 on: September 11, 2010, 07:42:55 AM »
I use this http://www.theswamp.org/index.php?topic=28286.0 I hate the registry  :-)

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: set or get variables in register
« Reply #4 on: September 11, 2010, 07:56:21 PM »
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   ;-)
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

dussla

  • Bull Frog
  • Posts: 291
Re: set or get variables in register
« Reply #5 on: September 12, 2010, 02:30:02 AM »
thank you good answer~