1
4
3
初来乍到
(defun bd( dpipepwd dpipeert)(if (not (tblsearch "LAYER" "axes"))(command "_.-layer" "_m" "axes" "_c" "1" "" "_lt" "center" "" ""));centerline properties format '("layer" "color" "ltype" "lweight")(setq dpropcln '("axes" "Bylayer" "Bylayer" ""))(if (not (tblsearch "LAYER" "patt"))(command "_.-layer" "_m" "patt" "_c" "8" "" "_lt" "continuous" "" ""));dproppat = hatching properties format '("name" "scale" "layer" "color" "ltype" "lweight")(setq dproppat '("ANSI32" 50.0 "patt" "Bylayer" "Bylayer" ""))(if (not (tblsearch "LAYER" "1"))(command "_.-layer" "_m" "1" "_c" "7" "" "_lt" "continuous" "" ""));dpropobj = objectline properties format '("layer" "color" "ltype" "lweight")(setq dpropobj '("1" "Bylayer" "Bylayer" ""))(ductmain "Radius" dpipeert (/ pi 12) "None" 3 dpipepwd dpipesuf nil));dproptxt = text/label properties format '("style" "textsize" "layer" "color" "ltype" "lweight");(setq dproptxt '("Label" 0.1 "text" "Bylayer" "Bylayer" ""));(if (not (tblsearch "STYLE" "Label")); (command "_.-style" "Label" "romans" 0.0 1.0 0.0 "_N" "_N" "_N"); );;(ductmain "Mitered" 6 (/ pi 12) "None" 3 12 "x12" nil);(ductmain "Radius" "1.5" (/ pi 12) "All" 3 12 "%%c" nil);(defun c:tray( / LAY);;dproppat = hatching properties format '("name" "scale" "layer" "color" "ltype" "lweight");(setq dproppat '("MUDST" 4.0 "" "8" "Bylayer" ""));(ductmain "Chamfered" 6 (/ pi 12) "All" 2 nil " " nil);(defun c:pipe();(ductmain "Radius" "1.5" (/ pi 12) "None" 3 nil (strcat (if (= (getvar "MEASUREMENT") 0) """ "") "%%C") nil);(defun c:duct();(ductmain nil nil (/ pi 12) "None" nil nil nil nil)(defun ductmain ( dpipeelb dpipeert dpipetrn dpipepat dpipecln dpipepwd dpipesuf dpipefpt / actDoc ang1 ang2 ang3 ptLst enDist dlastfpt dpipetan dpiperad ; = specified radius fPt lEnt lObj lPln oldVars oldWd plEnd plStart1 plStart2 pwd prDir dlp txEnt OldLineType NewLineType segLst Start stDist stLst tAng vlaPln cFlg *error* ;dpipewd ) (vl-load-com) (defun GetPlineVer(plObj) (mapcar 'cdr (vl-remove-if-not '(lambda(x)(=(car x)10)) (entget plObj))) ); end of GetPLineVer (defun asmi-PlineSegmentDataList(plObj / cLst outLst) (setq cLst (vl-remove-if-not '(lambda(x)(member(car x) '(10 40 41 42))) (entget plObj)) outLst '() ); end setq (while cLst (if(assoc 40 cLst) (progn (setq outLst (append outLst (list (list (cdr(assoc 10 cLst)) (cdr(assoc 40 cLst)) (cdr(assoc 41 cLst)) (cdr(assoc 42 cLst)) ); end list); end list ); end if); end setq (repeat 4(setq cLst(cdr cLst))); end repeat ); end progn (setq outLst (append outLst (list (list (cdr(assoc 10 cLst)) ); end list ); end list ); end append cLst nil ); end setq ); end if ); end while outLst ); end of asmi-GetPlineSegmentData (defun asmi-LayersUnlock(/ restLst) (setq restLst '()) (vlax-for lay (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object))) (setq restLst (append restLst (list (list lay (vla-get-Lock lay) (vla-get-Freeze lay)