Message 1 of 2
Setting variable with Environ()
Not applicable
04-30-2007
08:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a routine that opens multiple drawings in sequence, runs a series of cleanup routines, and closes the drawing. To avoid problems, SDI mode is set to 1 prior to launching.
In the macro button, I use this code to save the user's SDI mode before setting it to 1:
"^C^C(setenv "sdiprev" (getvar "sdi));sdi;1;vbastmt;frm1.show;;"
At the end of the VBA program, I'm using this statement, but it's giving me an error:
"ThisDrawing.SetVariable "SDI", Environ(sdiprev)"
Is this not the proper syntax? Any advice would be greatly appreciated.
~Buddy Deal
Wick Fisher White
Consulting Engineers
In the macro button, I use this code to save the user's SDI mode before setting it to 1:
"^C^C(setenv "sdiprev" (getvar "sdi));sdi;1;vbastmt;frm1.show;;"
At the end of the VBA program, I'm using this statement, but it's giving me an error:
"ThisDrawing.SetVariable "SDI", Environ(sdiprev)"
Is this not the proper syntax? Any advice would be greatly appreciated.
~Buddy Deal
Wick Fisher White
Consulting Engineers