4
57
53
初来乍到
(defun c:apd (/ LAY1 LAY2 LAY3 LAY4 CLR1 CLR2 CLR3 CLR4 LTP1 LTP2 LTP3 LTP4 FONT value1 value2 value3 rotation p);;; Change layer names and colors to suit user. (setq LAY1 "S-Pipe-Detail"LAY2 "S-Pipe-Dia"LAY3 "S-Pipe-Length"LAY4 "S-Pipe-Cut"CLR1 1CLR2 2CLR3 3CLR4 4LTP1 "Continuous"LTP2 "Continuous"LTP3 "Continuous"LTP4 "Continuous"FONT "Standard" );;;======================== Block Definition ======================(defun DEF_PipeDetail () ;generated using EntMaker CAB 04- MakeEntmake.lsp (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "PipeDetail") (10 0.0 0.0 0.0) (70 . 2) ) ) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "S-Pipe-Dia") (100 . "AcDbText") (10 0.0 0.0 0.0) (40 . 0.095833333333331) (1 . "-DIA-") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 1) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "PIPE DIAMETER:") (2 . "DIA") (70 . 0) (74 . 1) (280 . 0) ) ) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "S-Pipe-Length") (100 . "AcDbText") (10 0.0 0.0 0.0) (40 . 0.095833333333331) (1 . "-LENGTH-") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 1) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "PIPE LENGTH:") (2 . "PIPELENGTH") (70 . 0) (74 . 3) (280 . 0) ) ) (entmake '((0 . "ATTDEF") (100 . "AcDbEntity") (67 . 0) (8 . "S-Pipe-Cut") (100 . "AcDbText") (10 0.0 0.0 0.0) (40 . 0.095833333333331) (1 . "-LENGTH-") (50 . 0.0) (41 . 0. (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 1) (100 . "AcDbAttributeDefinition") (280 . 0) (3 . "CUT LENGTH:") (2 . "CUTLENGTH") (70 . 0) (74 . 3) (280 . 0) ) ) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) (princ)) ; end DEF_PipeDetail;;;======================== Insert Block ======================(defun insert_PipeDetail (p lay rot d_lay pl_lay cl_lay font value1 value2 value3) (entmake (list (cons 0 "INSERT") (cons 2 "PipeDetail")