AUTOCAD
-
2006
. .
, . .
AutoLisp
VisualLisp.
.
.
- - .
. .
. .
190000, -, . . , 67
-
, 2006
AutoCad . AutoCad ,
. AutoCad , .
AutoCad AutoLisp (
Common LISP), 1986 . Autodesk; LISP
LISting Processing ( ). AutoLisp ,
.
AutoLisp
.
1. AUTOLISP
1.1.
AutoLisp:; ; ; ; ; ;
AutoCad; AutoCad; (subr).
AutoLisp .
, ,
() ; . ; ;
; ; . ,
. , .
. . LISP.
, .
:
:
( 34 26.8)
12.6
(CAT EATS MOUSE)
MOUSE
(1 (12 9.28) ( ))
()
(setq point (100.0 25.2 7.8))
(* 2 5)
, .
(
).
-2147483648 2147483647.
GETINT -32768 +32767.
4
.
2.12
3.11592652543
-92722.121344
1.23544+17.
AutoLisp .
AutoLisp TYPE :
INT
REAL
STR
FILE
LIST
SUBR
SYM
AutoLisp
(, ), .
,
.
( 1 2 N)
:
T , ,
Nil (
),
Pi 3.14159,
Pause , AutoCad.
; .
1.2. AutoCad
AutoCad , ,
, .
5
. :
;
( , ).
(getvar ),
(setvar ).
1.3.
(setq <1> <1> [<2> <2> <N> <N>])
: (setq a bb b 2.5 c (0 0))
AutoCad. !,
, , AutoLisp.
Command: !b <ENTER>
Command:!a
bb
(set a 3) (setq a 3)
(set b c) c
(set a (+ k f)) (+ k f)
2. AUTOLISP
(defun VVOD()
.
.
.
; VVOD
; ()
;
)
(defun GEOM()
.
6
;
; GEOM()
.
.
)
(defun C:Myfunc()
(VVOD)
(GEOM)
)
;) Myfunc.
; VVOD
; GEOM
, My.lsp. ,
VisualLisp.
1. My.lsp :
AutoCad
(load My [ ])
(load E:\\Student\\My)
,
. , AutoCad , .
Files Support File Search Path c
Add .
load
. , .
My.lsp
:
(vl-load-all <>)
T .
2. . 1
Myfunc
:
(command (C:My))
(vl-cmdf (C:My))
3. VISUALLISP
3.1.
,
,
.
( ).
[CHECKING TEXT myprog.lsp loading...]
; Check done.
,
error malformed list on input ( ) ;
extra right paren on input ( );
malformed string on input ( ) ;
too few arguments in SETQ ( SETQ) setq.
Check Selection.
3.2.
,
, , , . , . , .
.
:
;
, CTRL+],
8
CTRL. .
CTRL + [ .
3.3.
Format Selection.
(. 1):
Tools ()\Environment Options( )\Visual
Lisp Format ( Visual LISP).
3.4.
.
. .
.
:
(defun mo ()
(setq p0 nil p1 nil p2 nil p3 nil)
(setq a 100 b 100 )
(setq p0 (list 0 0))
(setq p1 (polar p0 0 a)
p2 (polar p1 (/ pi 2.0) b)
p3 (polar p2 pi a)
)
(command _LINE p0 p1 p2 p3 _C)
)
9
. 1. :
;
10
,
, . . (mo). .
3.5.
, , . . .
. .
Debug () \ Animate (), a , (mo). .
. , .
, BREAK.
VLISP: Tools () \ Environment Options ( ) \ General Options ( )\ Diagnostic ().
: ,
, ,
. , .
, . .
-
11
Watch, . , , .
,
, .
.
Toggle breakpoint
VLISP.
. ,
. , ,
continue.
.
AutoCad,
( , ). ( ),
Visual LISP
,
.
. ,
12
4.
4.1
AutoCad : ()
(). , .
(s e tq p0 '(100.5 50.25))
(s e tq p0 (lis t 100.5 50.25))
(dis tance < 1> < 2>)
,
(angle < 1> < 2>)
, 1 2
.
(inte rs < 1> < 2>
(a 1 2) ( < > < 4> [par])
4). .
par
nil, , , .
. par ,
.
( ),
nil
13
AutoCad. (osnap
<> <>), , ,
. , , , , ,
_end ();
_nod () ,
_mid ();
_qua ()
_int ()
_cen ( )
_nea ()
, (setq pt2 (osnap pt1 _end, _mid))
4.2.
AutoLisp
, . ,
, .
, , .
, (,
2.0 , ). :
14
(abs <>)
(s in <>)
(cos <>)
(atan <1>
[<2>])
( < >)
(abs - 1.1) 1.1
,
,
< 2>, < 1> , [pi, - pi] .
, < 1>/< 2> -
. < 2> ,
< 1> + 1.570796 (+90 90 )
<>
(exp 1) 2.718 (exp 0) 1.0
(expt 2 2) 4 (expt - 2 2) 4
(expt 4 1) 0 ( )
(expt 4 1.0) 0.25 (
)
4.3.
(lis t 1 2 )
(setq p0 (list 100 200 300))
100, 200, 300 ( )
(car )
(setq Xp (car p0)) Xp X p0
, . (cdr )
(setq U (cdr p0))
U (200 300)
15
.
(car (cdr p0)) (setq Yp (cadr p0))
Yp Y p0
(caddr )
.
(car (cdr (cdr p0))),
(setq Zp (caddr p0)). Zp
Z p0
(nth ) .
0
(setq d '(11 12 13 14)) (nth 0 d) 11 (nth 4 d) nil
(las t )
nil,
(last ( )) nil (last (16 23 90)) 90
(re ve rs e )
,
(reverse (11 12 13 14)) (14 13 12 11)
(reverse nil) nil (reverse ( )) nil
(le ngth )
,
(length ( )) 0 (length nil) 0
(length (15 23 7 9)) 4
.
(appe nd 1
2
(append (17 20 6 (10 8 1)) (17 20 6 10 8 1)
N)
(cons <1> <2>)
(cons 50 (10 20))
(50 10 20)
(cons (10 20) (20 45) ((10 20) 20 45)
(cons 8 0) (8 . 0)
(cons 2 4)
(2 . 4)
(cons 262 nil) (262)
(me mbe r < > .
<> , <>)
nil,
16
4.4.
(fix <>)
(float <>)
(rtos <>
[< >]
[<>])
(fix 10.05) 10 (fix 0.0) 0 (fix 40.45) 40
(float 15) 15.0
<>
<> 1 2 <>
.
, ,
LUNITS
LUPREC
(rtos 10.9453 1 3) 1.095E+01
(rtos 10.9453 2 3) 10.945 (rtos 10.9453 2 0) 11
(itoa 16) 16
17
. : (atoi 2.5) 2
(atof <>)
c
(atof 14) 14.0 (atof 29.03) 29.03
(angtof <> , [< >]) ,
<> AUNITS:
0 , 1 , , ,
2 , 3 , 4
(angtof 30 0)
0.523699
(angtof 33d27'54\ 1) 0.584074
(angtos <>
[< >] ,
, [<>])
AUNITS - AUPREC
(angtos 1 0 0) 57 (angtos 1 1 3) 57d17'45\
(angtos 1 1 0) 57d
(dis tof <> ,
,
[< >])
. rtos.
(distof 1 2) 1.0
(atoi <>)
4.5.
(s trat <1>
<2> <N>) (strcat (itoa 12) - ) 12-
(s trle n <1>
- <2> <N>) (strlen ) 4
(s ubs tr <>
<> [< >]) (substr ABCDEF 3 2) CD
-
(chr <>)
(chr 192) A ()
(ASCII <>
(ascii A) 192
18
4.6. AutoLisp
,
. (. . , ) (),
(nil). (AND), (OR)
(NOT):
(and 1 2 ...)
(not )
(or 1 2 ...)
. nil,
( )
nil,
(and T nil) nil (and T T 2) T
. nil, nil;
nil,
(
) (= - 10.0 - 10 - 10.000) T
:
(setq x (sin 0)) 0.0
(setq y (sin (* 2.0 pi)) - 2.44921e- 016
(= x y) nil
( )
, ( )
(< 2 3 30)
(< 2 2 30) nil
(< a b k) T
, ( )
(<= 2 2 30) T
, ( )
(> 30 5 3) T
19
= eq equal
=
eq ,
equal (
(minusp <>)
(zerop <>)
(null <>)
(numberp <>)
(lisp <>)
20
(minusp 0) nil (minusp (- 51 24 39)) T
0
(zerop 0.0) 0 (zerop 1) nil
(null tt) nil (null ( )) T
,
,
4.7.
(if (> a b)
)
(progn
(setq c 1)
(setq d (c )
setq (e d)
);end progn
(progn
(setq c 2)
(setq d (* a b))
(setq e (* d b))
); end progn
); end if
(cond (< 1> <1>.) cas e
[(< 2> <2>.)]
(defun mm()
(setq cc 1)
(cond
((= cc 1) (SETQ ABC )
(COMMAND _line (0 0 0) '(100 100 0)
(250 100 0) _C)
); end (=cc 1)
((= cc 2) (SETQ ABC )
(COMMAND _circle (0 0 0) 100)
); end (=cc 2)
(T ); >2 <1
);end cond
); end defun
21
4.8.
. .
nil
(setq i 1 factorial 1)
(while (< i n)
(setq i (+ i 1)
(setq factorial (* factorial i))
); end while
(re pe at < > < 1>
[< 2>.< N>])
<>
(setq i 1 factorial 1)
(repeat (1 n)
(setq i (+ i 1) (setq factorial (* factorial i))
); end repeat
5. AUTOCAD
AutoCad AutoLisp
command:
(command _ a1 2 )
.
, , .
.
, \\
pause.
_.,
_.
,
, .
:
1. LINE
(command _.LINE \\ \\ ) n
(command _.LINE pt1 pt2 )
(command _.LINE (10 30) (40 50) )
22
2. CIRCLE
(command _.CIRCLE pt1 R)
(command _.CIRCLE (0 0) 100)
(command _.CIRCLE pt1 _D D)
(command _.CIRCLE _2P pt1 pt2)
(command _.CIRCLE _3P pt1 pt2 pt3)
(command _.CIRCLE _TTR \\ \\ R) , ,
3. ARC
(command _.ARC pt1 pt2 pt3)
(command _.ARC pt1 _C pt2 _A 120) , ,
(command _.ARC pt1 _C pt2 _L 100) , ,
(command _.ARC pt1 _E pt2 _A 120) , ,
4. ERASE C
(command _.ERASE e ) e ,
(command _.ERASE e1 e2 e3 )
5. OFFSET
(command _.OFFSET a e pt1)
e
(command _.OFFSET 50 e (30 200))
6. MOVE
(command _.MOVE e pt1 pt2) e
7. COPY
(command _.COPY e pt1 pt2)
8. ROTATE
(command _.ROTATE e pt1 A) A , e ; pt1
(command _.ROTATE e pt1 _R pt2 pt3 A) pt2 pt3
, A .
9. SCALE
(command _.SCALE e pt1 m) pt1 , m .
(command _.SCALE e pt1 _R pt2 pt3 L)- pt2 pt3 , L .
10. MIRROR
(command _MIRROR ee pt1 pt2 _N) ee
, pt1 pt2
23
11. ARRAY
(command _.ARRAY e _P p1 n 360 _Y) ,
n
(command _.ARRAY e _R n_row n_col 30 50)
12. DIVIDE
(command _.DIVIDE e n)
13. MEASURE
(command _.MEASURE e L)
14. EXPLODE
(command _.EXPLODE e)
15. TEXT
(command _.TEXT pt0 0 )
(command _.TEXT _C pt0 0 )
LO ; U ;
ON ; OFF ;
F ; T
COMMAND,
,
.
:
(defun :My()
(setvar CMDECHO 0) ; - (
;
(setq old_osmode (getvar OSMODE));
;
(setvar OSMODE 0);
(setq a nil b nil ) ;
(setq e (entlast))
(e ntge t e )
,
e
, ,
(, , . .)
,
((- 1 . < :2020500>
(0 . LINE)
(8 . 0)
(10. 73.478 160.222 0.0)
(11. 250.654 224.473 0.0))
(assoc _)
(assoc 0 ed) (0 .LINE)
(cdr (assoc 0 ed)) (LINE)
(setq P1 (cdr (assoc 10 ed)))
(setq X (car (cdr (assoc 10 ed)))) X
(e nts e l [])
, , ,
. []
(setq e (entsel \n ))
:
(<Entity name:600014> (3.00 5.00 0.00))
e (setq ed (entget (car e)))
(entnext [<
,
>])
(setq e1 (entnext))
,
nil,
(setq e2 (entnext e1))
(entlast)
26
(e ntde l <
>)
e nts e l:
(setq e3 (entnext (car (entsel ))))
, , ,
.
(setq e1 (entnext))
(entdel e1) e1
(entdel e1) e1
, .
.
(ssget)
(ssget _L)
(ssget _W (0 0) (200 100))
(ssget '(10 20))
(s s le ngth )
(ssname )
.
(selection object).
, :
<Selection set: 2>
, ,
(0 0) (200 100)
, (10 20).
(setq ss (ssget))
(setq ss (ssget))
(setq n (sslength ss))
.
0.
(setq e (ssname ss 0))
(setq sset (ssget)) sset
27
(s s me mb _
)
(ssadd)
(ssadd _)
(ssadd _
)
(s s de l _
)
28
(setq e1 (entnext)) e1
(setq ss (ssadd))
(0 )
(ssadd e1 ss) ,
e1
(setq e2 (entnext e1)) ,
e1
(ssadd e2 ss) ss,
, e2
. , , nil,
(ssdel e1 ss)
7. AUTOLISP
7.1. GET
. GET. GET
, . . , (
ENTER). ,
. .
GET. . \n ,
.
(getint [ ])
(ge tre al [ ])
(getstring [ ] )
(ge tpoint [] [
])
(getdist [] [
])
(setq m (getint \n ))
(setq rast (getreal \n ))
(setq st (getstring \n ))
X Y,
[], ,
[], .
(setq pt1 (getpoint \ ))
,
[].
. [] ,
(setq s (getdist \n ))
,
INITGET.
, AutoCad
.
29
(initget [] [])
, GETKWORD
(initget 1 )
(setq reply (getkword ?[/]:))
. initget
getint, getreal, getdist, getangle, getpoint.
[] :
1 (
<ENTER>)
2 0
4
[]
(initget 1)
(initget 3) (1) 0 (2)
(initget 7) (1), 0
(2) (4)
(initget 6) ,
0 (2) (4)
(initget 1 )
7.2.
AUTOLISP
:
DCL ( .dcl) ;
utoLisp ( .lsp).
DCL , .
. DCL .
.
, .
: , , ,
. . Autocad
base.dcl acad.dcl. base.dcl 30
, . . ! acad.dcl .
DCL- , base.dcl. .
DCL- VisualLisp
Interface Tools ( )
TOOLS (). ,
dialog label .
:e dit_box
Label=
Edit_width=
Edit _limit =
Value=
:column
:boxed_column
Label=
. ,
. Ec , ""
( ),
,
. 0,
,
,
. 132, 256
, (
). ,
. DCL- .
(
),
,
()
( ).
labe l ,
31
:row
:boxed_row
Label=
:image
Color=
Aspect_ratio=
Width=
Height=
:Radio_button
32
. ,
DCL-
, ()
( ). labe l
,
,
.
, , Autocad, ( 7):
Dialog_line ;
Dialog_foreground
( );
Dialog_background ;
Graphic_background ;
Black 0 () (
);
Red 1 (); Yellow 2 ();
Green 3 ( ); Cyan 4 ();
Blue 5 (); Magenta 6 ();
White 7 ()
(0.0),
. ,
. ,
.
. ,
Label=
Value=
,
.
, , , ; .
-
Value, ,
:Boxed_
,
radio_column
().
:Boxed_radio_row ,
, . Spacer
. , , ,
Errtile
.
, ,
error
,
.
Key=
Fixed_ eight=
Fix ed_widt h=
, . ASCII
.
, . , ,
.
. True
False ( False)
.
.
True False ( False)
33
Ok_only
Ok_cancel
Ok_cancel_help
(OK). key
accept
(OK and Cancel) , . key
(Cancel) cancel
ok_cancel (Help). key
help
7.3.
COIL.dcl.
COIL : dialog {
label = ;
:row {
: edit_box {
label= h,
mm ;
key = edit1;
fixed_width=true;
edit_limit = 6;
}
: edit_box {
label= L,
key = edit2;
fixed_width=true;
edit_limit = 6;
}
}
mm;
:row {
: edit_box {
label= R, mm ;
fixed_width=true;
key = edit3;
34
edit_limit = 6;
}
: edit_box {
label= b,
fixed_width=true;
key = edit4;
edit_limit = 6;
}
}
mm ;
: row {
: boxed_column {
label = ;
: button {
label = >;
key = pick_pt;
}
: row {
: edit_box {
label = X:;
key = x_pt;
edit_width = 7;
}
: edit_box {
label = Y:;
key = y_pt;
edit_width = 7;
}
}
}
}
:row {
spacer;
:image {
key=cir_image;
height=8;
width=14;
35
color=0;
}
spacer;
}
spacer;
ok_cancel;
errtile;
}
. 2. .
MSLIDE (),
.sld. .
. 2. COIL.lsp
:
: boxed_radio_column{
label=Direction;
fixed_height=true;
fixed_width=true;
36
:radio_button {
label=LEFT;
key=L;
fixed_height=true;
fixed_width=true;
}
:radio_button {
label=Right;
key=R;
fixed_height=true;
fixed_width=true;
}
}
7.4.
AutoLisp
DCL .
, .
AutoLisp .
(load_dialog
)
(unload_dialog
dcl_id)
(ne w_dialog
dcl_id)
37
. ne w_dialog. ,
done _dialog. done _dialog
, acce pt ( Ok) cance l ( )
(done_dialog
. .
[c])
c,
(action_tile ,
.
,
)
. ( v alue), , , $value ,
$key.
.
(set_tile
,
)
.
(ge t_tile )
.
. .
(dimx_tile )
(dimy_tile )
(s tart_image
,
)
(slide_image x1 y1 (.sld) . (0 0)
x2 y2 ) . (*.sld)
(*.slb). , .
X1 Y1 , X2 Y2
(end_image)
(start_dialog)
38
7.5. AutoLisp
(prompt \n.. );
;
(defun rs_error ()
(set_tile error ) ; ;
)
; X.
(defun do_x_pt()
(check_real (setq x_pt (get_tile x_pt)) x_pt) ;
)
; Y.
(defun do_y_pt()
(check_real (setq y_pt (get_tile y_pt)) y_pt) ;
)
; . real_number,
; nil
(defun check_real (real_number coord);
(if (distof real_number 2); distof c 2 ;
(progn
;
(rs_error) ;
;
real_number
)
(progn
;
(set_tile error ; ;
(strcat Incorrect coordinate
(strcase (substr coord 1 1))
.
)
)
nil
);end progn
);end if
);end defun check_real
39
;
; ,
; .
(defun defaults()
(if x_pt
(set_tile x_pt x_pt)
(progn
(set_tile x_pt (rtos 0.0000 2))
(setq x_pt (rtos 0.0000 2))
);end progn
);end if
(if y_pt
(set_tile y_pt y_pt)
(progn
(set_tile y_pt (rtos 0.0000 2))
(setq y_pt (rtos 0.0000 2))
)
)
(if h
;
(set_tile edit1 h)
(progn
;
(set_tile edit1 40)
(setq h 40)
)
)
(if L
;
(set_tile edit2 L)
(progn
;
(set_tile edit2 30)
(setq L 30)
)
)
(if r
;
(set_tile edit3 r)
(progn
;
(set_tile edit3 3)
40
(setq r 5)
)
)
(if b
; S
(set_tile edit4 b)
(progn
;
(set_tile edit4 3)
(setq b 3)
)
)
);end defun
; ;
(defun check_dat ()
(setq h (get_tile edit1)) ;
(setq L (get_tile edit2))
(setq r (get_tile edit3))
(setq b (get_tile edit4))
(if (or (<= (atof h) (* 2.0 (atof r)))
(<= (atof h) 0) (< (atof r) 0) (<= (atof b) 0) (<= (atof L) 0)
(>= (* (atof r) 2.0) (atof L))
)
(progn
(if (<= (atof h) 0)
(progn
(set_tile error : h > 0 !!! )
nil
)
(if (<= (atof L) 0)
(progn
(set_tile error : L > 0 !!! )
nil
)
(if (< (atof r) 0)
41
(progn
(set_tile error : r >= 0 !!! )
nil
)
(if (<= (atof b) 0)
(progn
(set_tile error : b > 0 !!! )
nil
)
(if (>= (* (atof r) 2.0) (atof L))
(progn
(set_tile error : L > 2*r !!! )
nil
)
(if (<= (atof h) (* 2.0 (atof r)))
(progn
(set_tile error : h > 2*r !!! )
nil
)
);end if
);end if
);end if
);end if
);end if
);end if
);end progn
(progn ;
(rs_error) ;
(done_dialog 1) ;
(setq what_next 1)
)
); end if
);end defun check_dat
(defun C:COIL ();
; - (
;
42
_N)
)
(progn
(command LINE pt11 p2 )
(command LINE pt12 p4 )
(command LINE p21 p31 )
(command LINE p32 p41 )
(command ARC _C pc pt12 pt11)
(command ARC _C pc1 p32 p31)
)
);end if
(command MIRROR (_$endmark $COIL) p4 (polar p4 0 L)
; $endmark , $COIL
(command PLINE p4 _W 0.5 0.5 p41 )
(command MIRROR (_$endmark $COIL1) p2 (polar p2 (/ pi
2.0) h) _N)
(command PLINE p2 _W 0.5 0.5 p21 )
(setq e1 (entlast))
(command MIRROR e1 p4 p41 _N)
)
) ;end if
(command ZOOM _E)
(command REDRAW)
(setq C:COIL nil)
;
(setvar OSMODE old_osmode)
(setvar CMDECHO 1)
(princ);
)
45
7.6.
. ACAD.lsp
ACADDOC.lsp. AutoCad
ACAD.lsp . ,
. ACAD.lsp
AutoCad. , ,
ACADDOC.lsp,
. ACAD.lsp Load ACAD.LSP
with Every Drawing ( ACAD.lsp ), System () Options (). , ACADDOC.lsp.
.
, ACAD.lsp
ACADDOC.lsp.
(defun _$rtd ($a) ;
(* (/ 180.0 pi) $a)
(defun _$dtr ($a) ;
(* (/ pi 180.0) $a)) (defun arcsin (x /)
; Arcsin ,
(cond
((= x 0.0) 0.0)
((= x 1.0) (/ pi 2))
((= x 1.0) (/ (- 0 pi) 2))
(t (atan (/ x (sqrt (abs (- 1 (* x x)))))))
)
)
(defun arccos (x /); Arccos ,
(cond
((= x 0.0) (/ PI 2.0))
((= x 1.0) 0.0)
46
47
8. -
(getfiled <>
<> <>
<>)
,
. ( *)
1 (
)
4 ( )
16 ,
(getfiled D:/ doc 16)
(getfiled C D:/ doc 17)
(getfiled C D:/./a doc 1)
(findfile <>)
( ).
,
AutoCad .
nil,
(open <>
,
<>)
:
w
r
a
nil
(setq f (open A.TXT w))
(close <>) (close f)
(read- line
.
<>)
. , nil
(setq st (read- line f))
(setq st1 (read- line)) c
48
(read- char
<>)
(write- line
< >)
.
. ,
,
(write- line f)
-
.
( ). 0. (write- char 50)
2 50
, T,
; nil .
(vl- file- delete a.txt)
:
(setq jj (open limit.dat r))
(if jj
(progn
(setq bz (atof (read-line jj)))
(setq hj (atof (read-line jj)))
)
49
(progn
(setq bz 0.8)
(setq hj 4.0)
)
)
9. VLX-
LSP-, DCL , FAS-, DVB- Visual Basic for
Applications (-). vlx. prv,
. VLX- Make
Application ( ) File (). :
New Application Wizard ( );
Existing Application Properties ( );
Make Application ( );
Rebuild Application ( ).
New
Application Wizard ( ), Wizard Mode ( ), . 3.
. 3. Wizard Mode
50
. 4. Application Directory
Browse ().
Target File ( )
vlx. Next () (. 5) Application Options ( ). Separate
Namespace ( ) . , . (. 6) LISP
Files to Include (LISP- )
lsp ( ), fas (51
. 5. Application Options
) prv ( ), . Add ()
Remove () , ,
. (), Up (), Down () Bottom
() LISP-52
. (LISP
source files ( LISP-),
Compiled LISP files ( LISP-) Visual LISP
project files ( Visual LISP)),
. Add () Remove
() , , . (), Up (), Down () Bottom () LISP-
. (LISP source
files ( LISP-), Compiled LISP files (
LISP-) Visual LISP project files ( Visual LISP)),
.
54
AutoCAD.
(. 9), , Review Selections / Build Application
( / ). Build Application ( ) Finish (), Visual LISP ( vlx) ( prv).
Finish (),
PRV-, . Make Application
( ) File (). Existing Application Properties ( ) , Rebuild Application (
) , - (DCL-, LSP- . .).
Visual LISP
LISP load Load File ( ) File
(). AutoCAD
Visual LISP, load, AutoLISP,
Load () Tools () Load Application
() .
10.
:
VisualLisp
.
:
1. .
2. DCL- .
3.
.
4. LSP- .
.
55
5. LSP-.
6.
AutoCad.
7. , :
;
-;
, ;
DCL-;
;
LSP- ;
, .
.
.
1. . . Visual LISP AutoCad. .:
-, 2001. 576 c.
2. . AutoLisp. AutoCad 14. .: ,
1999. 365 c.
3. . AutoCad: . .: -, 1995. 235 c.
4. . . AutoCad 2002. .: -, 2003. 1200 c.
5. C. ., . . AutoCad . .: -, 2004. 1168 .
6. ., ., .AutoCad 2002 .
. : , 2002. 944 .
56
57
.
9
10
11
12
13
14
15
16
58
.
17
18
19
20
21
22
23
24
59
......................................................................................................
1. AutoLisp ..................................................................
1. 1. .........................................................................................
1.2. AutoCad ........................................................
1.3. ............................................................................
2. AutoLisp ...................................................
3. VISUALLISP ..........................................................
3.1. .......................................................................
3.2. ....................................................
3.3. ...................................................
3.4. ....................................................
3.5. ...................
4. ....................................................................................
4.1 ......................................................................
4.2. ....................................................................
4.3. .......................................................
4.4. .....................................................................
4.5. ........................................................
4.6. AutoLisp ............................................................
4.7. ...........................................
4.8. .....................................................................................
5. AutoCad .......................................................
6. AutoCad ..............................................
7. AutoLisp ..................................................................
7.1. GET ................
7.2. ...................................................................................
7.3. ....................................................................
7.4. AutoLisp ...
7.5. AutoLisp ..............................................
7.6. ........................................
8. - ............................................................
9. VLX- ...........................................................................
10. .....................
.............................................................................
.......................................................................................................
60
3
4
4
5
6
6
8
8
8
9
10
11
13
13
14
15
17
18
19
21
22
22
25
29
29
30
34
37
39
46
48
50
55
56
57