CAD/CAM discussion forum > CAD > Global variable

Global variable

    
  Subscribe Topic

Rank: 1

Gustavo

Newbie

posts: 2

Registered: 2010-12-13

Message 1 of 4

08-07-2010 10:17 . pm   |   View his/her posts only
I'm trying to meke some programs to run under ZW other than AutoCAD, where are runing .
I have routins that uses global variables.
When I open a new DWG these variables are not setted becouse I do not made a propagate to them, (vl-propagate ....) but in ZW I have the problem that they value remain for new open DWG, even if I set SDI to ON .
Is it there any thing to set that the global variables belong just for the DWG where were setted?

Thanks

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 2 of 4

 Global variable
31-07-2010 02:50 . pm   |   View his/her posts only


I don't understand your last question. What do you mean? Just remember the basic rules of global variables. It's supposed to be accessible in all parts of the program, you just need to declare it as global variable in the main program or module. snohomish landscaping

Rank: 1

Gustavo

Newbie

posts: 2

Registered: 2010-12-13

Message 3 of 4

24-10-2010 01:13 . pm   |   View his/her posts only
Sorry global variables are global but for each session, so when you open a new DWG they are all nil, at least in AUtoCAD and if you want them for ALL the sessions you must declare it with vl-propagate, but in ZW the value given to a global value remain in all new DWG opened and you have to reset them

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 4 of 4

 Global variable
31-07-2010 02:50 . pm   |   View his/her posts only
Dear saper59,

If you want variables not remained in different drawings, you should set SDI =0, or set SDI=1 and lispinit=1 at the same time.

ZWCAD doesn't support to set variables only effected to one specific drawing, and this problem ID is 12829. And there is no temp solution.
See also
X