1 / 22
文档名称:

autolisp程序入门教学资料(AutoLISP program introductory teaching materials).doc

格式:doc   大小:26KB   页数:22页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

autolisp程序入门教学资料(AutoLISP program introductory teaching materials).doc

上传人:rjmy2261 2017/11/13 文件大小:26 KB

下载得到文件列表

autolisp程序入门教学资料(AutoLISP program introductory teaching materials).doc

相关文档

文档介绍

文档介绍:autolisp程序入门教学资料(AutoLISP program introductory teaching materials)
Introduction to AutoLISP programs
resources material
I. brief introduction of AutoLISP (advantages and disadvantages)
AutoLISP language is the main tool for developing Autocad. It is the product of bination of LISP language and Autocad. It plays an important role in the development and expansion of Autocad. It is because of the open architecture represented by AutoLISP that Autocad has been in an invincible position in numerous CAD petitions.
AutoLISP is an interpreted language, can be run directly in Autocad, rather than piled language with the help of the original program must piled and linked to piler to generate executable code modules, the user only needs the help of a text editor (such as DOS's "EDIT" program) can be programmed.
AutoLISP (List Processing Language) is a kind of list processing language? Quot; table "is the data structure of AutoLISP language unique, widely used in AutoLISP, the table is an effective method for a large amount of data stored in a variable. For example, AutoCAD represents three dimensional points in the form of three real numbers (X, Y, Z).
Two. Assignment method in AutoLISP
Unlike puter languages use infix method "to represent program statements (expression) and the" prefix ".
For example, in the C language, assign 125 to the real number X and write it:
X = 125;
The operator "=" is placed between operands X and 125.
And AutoLISP is written:
(setq X 125)
The operator "setq" is placed before operands X and 125.
"Setq" is the most important assignment function of AutoLISP. Almost all of the variable assignments should be implemented by quot; setq.
Three. How to add a mand to AutoCAD (or how to define a function)
Structure and loading of general program
In the following example, we will understand the structure of the general program of AutoLISP language, how to define a executable function in AutoCAD, the use of "setq", and how to load programs in A