AUGIWorld Magazine September/October 2007 - (Page 15) VL-REGISTRY-DELETE functions, you must make sure the Visual LISP functions are available by using the statement (vlload-com) at the top of the file that defines the routines that will be using any of the Visual LISP functions. To see what the values look like and the structure of information in the Windows Registry, you can use the Regedit.exe application. To start the Windows Registry Editor (Regedit.exe), click Run from the Windows Start menu and type Regedit. exe in the Run dialog box. The following example code creates two new keys under the Current User branch of the Windows Registry, displays the value of one of the keys before and after a value is assigned to the key, and then deletes one of the keys that was created. Warning: Be careful when using the Windows Registry Editor not to accidentally make any changes. Changing values and deleting keys can result in software that no longer functions, so use the Windows Registry Editor at your own risk. ;; Add a value to the registry, read it back, ;; and then delete it. (defun c:SetValWinReg( / regVal) (alert (strcat “Current Discipline: “ (if (setq regVal (vl-registry-read “HKEY_CURRENT_USER\\Software\\MyApp” “Key2” ) ) regVal “ ” ) ) ) ;; Creates a new key named Key1 with the value Val1 (vl-registry-write “HKEY_CURRENT_USER\\Software\\MyApp” “Key1” “Val” ) ;; Creates a new key named Key2 with the value Val2 (vl-registry-write “HKEY_CURRENT_USER\\Software\\MyApp” “Key2” “Val2” ) ;; Displays the value of Key1 (alert (vl-registry-read “HKEY_CURRENT_USER\\Software\\MyApp” “Key1” ) ) ;; Deletes the key named Key2 (vl-registry-delete “HKEY_CURRENT_USER\\Software\\MyApp\\Key2” ) ) Conclusion When creating custom routines it is always best to implement the best storage method for your values based on how you might use them in the future. One of the things to consider when creating your own custom routines is to observe how AutoCAD stores values for use when a command is used next time and to mimic the behavior that AutoCAD employs. By mimicking AutoCAD’s behavior when it comes to storing values and command prompts, it will help give your custom routines that same look and feel as AutoCAD commands. If your custom routines look and feel similar to the ones that come with AutoCAD, the users of your commands will be more comfortable using them because they follow the formats with which they are already familiar. Lee Ambrosius is a consultant for HyperPics, LLC an AutoCAD Consulting/ Training company located in Wisconsin, USA. He specializes in AutoCAD Customization/Programming with AutoCAD R12 through 2008. He is one of the co-authors of the book AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies (based on AutoCAD 2007) and is the author of the book AutoCAD 2008 3D Modeling Workbook For Dummies. Lee can be reached via e-mail at lee_ ambrosius@hyperpics.com; other contact information can be found on his Website at http://www.hyperpics.com or his Blog at http://hyperpics.blogs.com. Seven distribution centers nationwide Industry experienced customer service Next business day shipping Easy online ordering For quick and easy CAD-related orders, go with a supplier who knows their cursor from their chamfer. Call MasterGraphics. We have more than 3,000 products, from bond paper, toner, and inkjet cartridges for all brands of printers and plotters including Xerox, HP and Océ, to quality drafting supplies and furniture. Trust us to understand your needs. Your equipment. And most importantly, your language. MasterGraphics | Single Source. Endless Possibilities.™ To order, visit our online store at www.masterg.com/augi or call (800) 873.7238 today. (800) 873.7238 • www.masterg.com/augi Sep/Oct 2007 15 http://www.hyperpics.com http://hyperpics.blogs.com http://www.masterg.com/augi
Table of Contents Feed for the Digital Edition of AUGIWorld Magazine September/October 2007 Contents The CAD Manager Feature: A Good First Impression ADT and SketchUp Team for Presentations Accessing Values: Now or Later Finding the 3D in Map 3D: Surface Visualization Rocks & Rock Walls Autodesk University 2007 Preview The Missing Link On the Back Page AUGIWorld Magazine September/October 2007 AUGIWorld Magazine September/October 2007 - (Page Cover1) AUGIWorld Magazine September/October 2007 - (Page Cover2) AUGIWorld Magazine September/October 2007 - (Page 1) AUGIWorld Magazine September/October 2007 - Contents (Page 2) AUGIWorld Magazine September/October 2007 - Contents (Page 3) AUGIWorld Magazine September/October 2007 - The CAD Manager (Page 4) AUGIWorld Magazine September/October 2007 - The CAD Manager (Page 5) AUGIWorld Magazine September/October 2007 - Feature: A Good First Impression (Page 6) AUGIWorld Magazine September/October 2007 - Feature: A Good First Impression (Page 7) AUGIWorld Magazine September/October 2007 - Feature: A Good First Impression (Page 8) AUGIWorld Magazine September/October 2007 - Feature: A Good First Impression (Page 9) AUGIWorld Magazine September/October 2007 - Feature: A Good First Impression (Page 10) AUGIWorld Magazine September/October 2007 - Feature: A Good First Impression (Page 11) AUGIWorld Magazine September/October 2007 - ADT and SketchUp Team for Presentations (Page 12) AUGIWorld Magazine September/October 2007 - ADT and SketchUp Team for Presentations (Page 13) AUGIWorld Magazine September/October 2007 - Accessing Values: Now or Later (Page 14) AUGIWorld Magazine September/October 2007 - Accessing Values: Now or Later (Page 15) AUGIWorld Magazine September/October 2007 - Finding the 3D in Map 3D: Surface Visualization (Page 16) AUGIWorld Magazine September/October 2007 - Finding the 3D in Map 3D: Surface Visualization (Page 17) AUGIWorld Magazine September/October 2007 - Finding the 3D in Map 3D: Surface Visualization (Page 18) AUGIWorld Magazine September/October 2007 - Finding the 3D in Map 3D: Surface Visualization (Page 19) AUGIWorld Magazine September/October 2007 - Rocks & Rock Walls (Page 20) AUGIWorld Magazine September/October 2007 - Rocks & Rock Walls (Page 21) AUGIWorld Magazine September/October 2007 - Rocks & Rock Walls (Page 22) AUGIWorld Magazine September/October 2007 - Rocks & Rock Walls (Page 23) AUGIWorld Magazine September/October 2007 - Autodesk University 2007 Preview (Page 24) AUGIWorld Magazine September/October 2007 - Autodesk University 2007 Preview (Page 25) AUGIWorld Magazine September/October 2007 - Autodesk University 2007 Preview (Page 26) AUGIWorld Magazine September/October 2007 - Autodesk University 2007 Preview (Page 27) AUGIWorld Magazine September/October 2007 - The Missing Link (Page 28) AUGIWorld Magazine September/October 2007 - The Missing Link (Page 29) AUGIWorld Magazine September/October 2007 - The Missing Link (Page 30) AUGIWorld Magazine September/October 2007 - The Missing Link (Page 31) AUGIWorld Magazine September/October 2007 - The Missing Link (Page 32) AUGIWorld Magazine September/October 2007 - The Missing Link (Page 33) AUGIWorld Magazine September/October 2007 - On the Back Page (Page 34) AUGIWorld Magazine September/October 2007 - On the Back Page (Page Cover3) AUGIWorld Magazine September/October 2007 - On the Back Page (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.