AutoCAD-插件篇
插件介绍
优点
AutoCAD插件的优点:
- 使添加新特性变得简单
- 允许第三方开发者开发新特性
- 给予用户自由定制特性
插件文件格式
.fas
:由AutoLISP创建的AutoLISP已编译文件。FAS文件只包含单个编译过的AutoLISP函数。
.vlx
:由AutoLISP创建的AutoLISP已编译文件。VLX文件包含多个编译过的AutoLISP函数。
.lsp
:AutoLISP源代码文件,该文件由ASCII编码格式保存。
FAS文件和VLX文件的区别
从语义上理解,
VLX文件是独立的AutoCAD应用程序,可以包含多个AutoLISP函数(可能存在个别函数是从FAS文件引入的),因此VLX文件的功能更多样,更强大,可以作为正式的插件使用。
References
Here is a brief summary of the types of files used by the VLISP project management feature:
Visual LISP project file types
File ext. | Type of file | Function |
---|---|---|
.fas | Compiled AutoLISP code | Compiled AutoLISP programs. May be loaded and run, or compiled into VLX modules |
.lsp | AutoLISP source code | Program source files |
.ob | Object code | Used internally by VLISP, these files contain compiled AutoLISP code used in building FAS files |
.pdb | Project database | Used internally by VLISP, these files contain symbol information used by the compiler |
.prj | Project definition | Contains the location and names of all source files that build the project, as well as certain parameters and rules on how to create the final FAS files |
In addition to the files recognized by the project manager, VLISP either creates, processes, or recognizes a number of additional types of files, as summarized below:
Additional Visual LISP file types
File ext. | Type of file | Function |
---|---|---|
.dsk | Desktop save | Contains VLISP environment and window settings. (Note: Editing this file may permanently change the VLISP environment. Do not edit this file without creating a backup copy first.) |
._xx | Backup files | Backup copies of edited files, maintained by the VLISP editor. Backup files contain the same name as the original, except that the file extension begins with the underline character (_) and is followed by the first two characters of the original file’s extension. For example, the backup file of a LSP file has an ._LS extension; the backup of a DCL file has a ._DC extension. |
.vlx | Stand-alone applications | Stand-alone AutoCAD applications, which can be created using the VLISP Make Application wizard. |
.c, .cpp, .cch, .hpp, .hh | Language source files | Contain program source code. The VLISP editor recognizes the syntax of these files and color-codes reserved words, strings, and numbers. |
.dcl | Dialog control language | Contains definitions of AutoCAD dialog boxes. VLISP can preview these files, and you can include them in Visual LISP executable (VLX) files. |
.prv | Make application | Defines the files and options used to build a VLX application with the VLISP Make Application wizard. |
.sql | Structured query language | Contains SQL statements. The VLISP text editor recognizes this file type and color-codes the text according to SQL syntax rules. |
Help: About LISP, FAS, and Other File Types (AutoLISP)
What’s the technical definition for “routine”? - Stack Overflow
插件使用
在插件使用上,我们只关注可以提供多个功能的.vlx
文件和提供单一功能的.fas
文件。