The thoughts of a CADD Manager.

Sunday, January 30, 2005

Can This Be My Default? - Part One

This is the first part of a two-part series on how to save settings of your programs in AutoCAD. It is one of the many things that differentiates a professional program from the others. This part gives some excellent links from Cadvault.com on how to save setting and some of the options you have. The second part will give a number of examples of what I have done to 'save settings'. So read on, and let me know what you think.

Saving Settings - Why we spend the time to do this.

Ever created a program or a macro and heard someone say something along the lines of "I am having to change this every time I open the program","can you change to program to have this setting the default?", or my favorite, "can you make it a little bit more intuitive?"

The reality is that when someone uses the word 'intuitive' they mean they way they like it. This is just fine, except for ever two people, there is two ways to do one thing in AutoCAD. That is where you run into the problems. Who's intuition should you go with? The person who is paying you or the person using it? Do you take the opinions of everyone and try to make everyone happy? You may not be able to please everyone all the time, but you may be able to get close by allowing the user to set up a set of options to their liking.

Enter Saving Settings. But how do we do this? There are a ton of different ways to save setting in programs. Anything from editing the registry to saving a txt file. If you don't know how to do this, there are a few links on Cadvault.com that will really help you.

Making Users Feel At Home - Saving Settings is an article that explains how visual basic modifies the registry to save settings and also how to use an ini file. There is also a discussion in this community that has a zip file that discusses how to use XML to save a layer state and how to reload it back into AutoCAD. The discussion starts to go a little adrift in the beginning, but after page four, there are some pretty interesting things that people have done with this XML.

So take a look at these ways and find your own favorite way to save settings. I have decided to go with xml as my preference. I did because is very easy to edit, share, transfer, or backup. Plus, most of the time, I want my users to be able to create their own defaults. That is what the next part will mainly go over - how I have used XML to save settings in AutoCAD.

Until next time, Cheers.