譬如附图中的程序有5个参数,调用时我只想填入3个,另外两个采用默认值。
代码要怎么写?
 - (defun XP-MakeLine (P10 P11 LayerName color LineType /)
- (entmake (list '(0 . "LINE")
- (cons 8 LayerName)
- (cons 62 color)
- (cons 6 LineType)
- (cons 10 P10)
- (cons 11 P11)
- )
- )
- (entlast)
- )
- (defun c:tt (/)
- (XP-MakeLine (getpoint) (getpoint) "0" 256 "BYLAYER")
- )
|