hncjddd 发表于 2019-5-30 11:18:02

entmake创建图元

1、直线
(entmake (list '(0 . "LINE") (cons 10 pt1) (cons 11 pt2)))

2、两顶点多段线(多顶点类似)
(entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 2) (cons 10 pt1) (cons 10 pt2)))

3、点表生成多段线
   (entmake (append    (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length lst)))
      (mapcar '(lambda (pt)(cons 10 pt)) lst ))
)

4、圆
(entmake (list '(0 . "CIRCLE") (cons 10 pt) (cons 40 r)))

5、圆弧
(entmake (list '(0 . "ARC") (cons 10 pt) (cons 40 r) (cons 50 ang1) (cons 51 ang2)))

6、单行文本
(entmake (list '(0 . "TEXT") (cons 1 str) (cons 10 pt) (cons 40 5)))

7、多行文本
(entmake (list '(0 . "MTEXT") '(100 . "AcDbEntity") '(100 . "AcDbMText") '(7 . "Standard") (cons 1 str) (cons 10 pt)))

8、半径标注
(entmake (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension")(cons 10 pt) '(70 . 36) '(100 . "AcDbRadialDimension")      (cons 15 pt1) ) )

9、直径标注
(entmake (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension") (cons 10 pt1) (cons 11 pt2) '(70 . 163) '
   (100 . "AcDbDiametricDimension") (cons 15 pt3)
    )
)

10、水平标注
(entmake (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension") (cons 10 pt) '(70 . 32) '(1 . "") '(100 . "AcDbAlignedDimension")
   (cons 13 pt1) (cons 14 pt2) '(100 . "AcDbRotatedDimension")
    )
)

11、垂直标注
(entmake (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension") (cons 10 pt) '(70 . 32) '(1 . "") '(100 . "AcDbAlignedDimension")
   (cons 13 pt1) (cons 14 pt2) '(50 . 1.5708) '(100 . "AcDbRotatedDimension")
    )
)


12、倾斜标注
(entmake (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension") (cons 10 pt1) '(70 . 33) '(1 . "") '(100 . "AcDbAlignedDimension")
   (cons 13 pt2) (cons 14 pt3)
    )
)


烟盒迷唇 发表于 2019-6-1 20:08:58

不齐全,齐全的早已发布过了
页: [1]
查看完整版本: entmake创建图元