很大的问题,你还没弄懂 ' 的作用与区别。
'(0 . "hatch")和(cons 0 "hatch")
用cons 函数可以构造点对函数,cons后面才能用变量,而'实际是quote函数简写'(0 . "hatch")=(quote (0 . "hatch"))
说说你的entmake表结构。
如果使用了变量,那么entmake为
 - (entmake (list (cons 0 "hatch")
- (cons 100 "AcDbEntity")
- (cons 8 "0")
- (cons 100 "AcDbHatch")
- (cons 10 (list 0 0 0))
- 省略
- )
- )
因为0 100等组码值固定那么可以简写为
 - (entmake (list '(0 . "hatch")
- '(100 . "AcDbEntity")
- '(8 . "0")
- '(100 . "AcDbHatch")
- (cons 10 (list 0 0 0))
- 省略
- )
- )
另外,用entmakex是可以返回创建的新图元名的。
|