AutoLisp Examples Auto lisp Basics Auto lisp is the grand daddy of Auto CAD programming tools and you ’dbe amazed at the amount of Auto lisp programming tools you can find on the . Given a little knowledge you can integrate existing Auto lisp routines into your own and gain tremendous power over your AutoCAD based installation. The first thing to understand is that Auto lisp has a couple of key files and a key function that perform startup operations for you. The key files are called and and the key function is called S::STARTUP and their operations are as summarized here: – This file loads when AutoCAD starts up. Any programming you place within this file will be automatically loaded every time AutoCAD starts. The file is normally located in the SUPPORT subdirectory of the AutoCAD installation. – This file loads every time a new drawing session is started in AutoCAD 2000, 2000i or2002 based products. Therefore any programming you place in this file will be loaded automatically every time a drawing is opened or started. Note that while the file would load in the FIRST drawing of the AutoCAD 2000 type products only the file will load with subsequent drawings. Since AutoCAD R14 doesn ’t support multiple drawing sessions you won ’t have to worry about the file with R14. Like the file, is normally located in the SUPPORT subdirectory of the AutoCAD installation. S::STARTUP function – This function is typically within the file (or file for AutoCAD R14 installations) and its sole job is to execute mands you need to initialize your new drawing environment. This function is the perfect place to set system variables like DIMSCALE, VIEWRES parameters, current layers, etc. The most powerful aspect of the S::STARTUP function is that it invokes automatically and it lets you control exactly how the AutoCAD environment is initialized. Simple Examples If you
英文文献 来自淘豆网www.taodocs.com转载请标明出处.