Let’s see if this has ever happened to you. You’re working along, happy as a clam, when suddenly – for no apparent reason- something doesn’t work like you’re used to. For example, let’s say you try to open an existing drawing file and don’t get the open dialog. Instead, the Command Line wants you to type it in. Substitute your own example, but I bet almost everyone using AutoCAD has run into things like this.
So, what do you do? You might search the internet for a solution, or if you have a CAD Manager, you give them a call (for years, that would have been me). You finally find the answer (which is to set FILEDIA to 1) and go about your business, convinced that vengeful gremlins had briefly invaded your system.
Until the next day when it happens again. What’s going on? More than likely, you’ve used some custom tool, probably in AutoLISP, that changed the FILEDIA variable for its internal purposes but didn’t reset it if you cancel the command. Or worse yet, the code is so poorly written that it just plain fails to reset it.
Note: Do you program in AutoLISP, but aren’t sure what I’m talking about? Check out this AKN entry on error handling.
Wouldn’t it be great if you knew in advance that FILEDIA – or pretty much any System Variable – got changed? It would undoubtedly help you or your CAD Manager track down the solution.
SYSVARMONITOR to the Rescue
The AutoCAD System Variable Monitor was introduced in the 2016 release. It wasn’t one of those prominent features that jumped out at you, so it may still be unknown to you. Let’s take a look at it.
First, it’s on by default but will only appear in the Status Bar if a System Variable in its default “watch” list changes. The Command Line will also provide you with a message. But… let’s be honest, these notices are extremely easy to miss.
So, my tip within a tip is this: Bring up the dialog box by typing in SYSVARMONITOR and checking the Enable balloon notification checkbox. (Yes, that’s a lot of typing, but you really only need to go as far as SYSV – autocomplete will take care of the rest for you).
Now, when a watched variable is changed, you’ll get a very obvious balloon notification. If you’re going to use the SysVar Monitor, you might as well make sure you know when something changes.
When a monitored System Variable changes, click on the link in the balloon notification. The dialog box appears, where you can manage the changed variable. Click on the value to change or use my preferred method of clicking on the Reset All button.
As you can see, there are nine variables listed by default. They represent the usual suspects but trust this AutoLISP programmer; there are plenty of other variables that we turn on or off (and hopefully reset properly).
You can change the contents of your monitored variables with the Edit button on the right side of the dialog. Feel free to scroll through the 837 entries to find the one you want. (Yes, I really did count them. Three times. I got the same number twice, so I went with it.) Or you can use the search feature as the animation below shows. When you find your variable, add it to the list! It really is just that easy.
Some Final Thoughts
Keep in mind that managing these changed variables may be just the start. You or your CAD manager will need to find and hopefully fix the culprit. Depending on the skill level and experience of this SysVar detective, the offending code could be anywhere from obvious to obscure. I’ve even found that sometimes it’s a third-party program that is causing the problem. You really never know.
So, if you’re experiencing odd changes in your AutoCAD sessions, remember that the System Variable Monitor is there to help you manage your variables and provide immediate feedback to help you find any offending code.
More Tuesday Tips
Check out our whole Tuesday Tips series for ideas on how to make AutoCAD work for you. Do you have any favorite AutoCAD tips? Tell us in the comments!