Author
Topic: Custom System Variables (Read 2189 times)

At AU 2011, in Bill Adkinson's class on the Undo/Redo system he briefly mentioned creating your own system variables in the registry. I haven't been able to find anything written on the matter via a few searches on google. Does anyone have any experience in trying this?

Tony T posted an example C# project a few years ago demonstrating how to implement Custom System Variables. Since his site is no longer available, I could send it to you direct if you'd like. I'm not sure how the laws apply to defunct websites, but the EULA included says

Quote

Further, the intent of this license is to prohibit all forms of unauthorized distribution of the SOFTWARE for any purpose.The AUTHOR's sole point of distribution of the SOFTWARE is at the following interet URL:

Variables are created by declaring them in the registry. The following format should be used (elements between {} should be replaced with a legal value for the property or type indicated inside the {}). [HKEY_LOCAL_MACHINE{ProductRegistryRoot}Variables{AcRxVariable::name()}] @="{some value}" : Required, will be converted to PrimaryDataType "PrimaryType"=dword:{AcRxVariable::primaryType()} : Required "SecondaryType"=dword:{AcRxVariable::seondaryType()} : Optional "TypeFlags"=dword:{AcRxVariable::typeFlags()} : Optional "StorageType"=dword:{AcRxVariable::StorageType} : Required "Owner"="{LogicalAppName|exe}" : Optional "Range"="{lowerbound},{upperbound}" : Optional, applies to RTREAL, RTANG, RTSHORT and RTLONG primary types Note these variables can be get/set using acedGetVar/acedSetVar functions in AutoCAD. They are also visible to the SETVAR command.

I have little something that I started once I get a little time will finish it up and post.

Thanks for the replies. I went the Gile route, created the app (DLL) and a .reg file to install registry entries. Thanks Jeff_M for getting me the Tony T stuff. That really showed me the how, where, and why of custom system variables.