【累计长度cd】
(DEFUN C:cd ()
(tq tot_len 0)
(prompt "\nSelect all objects to count请选择所有要累计长度的物体: ")
(tq ss (ssget))
(while (> (sslength ss) 0)
(tq en (ssname ss 0))
suffer from
(tq ed (entget en))
(tq e_type (cdr (assoc '0 ed)))
(cond
((= e_type "LINE") (add_lines))
((= e_type "ARC") (add_arcs))
((= e_type "POLYLINE") (add_poly))
((or
(/= e_type "LINE")
(/= e_type "ARC")
(/= e_type "POLYLINE")
)
(ssdel en ss)
)环球北美考试院
)
)
(prompt (strcat "\nTotal length is 总长度是: " (rtos tot_len 2 2)))
)
(princ)
【焊缝hf】
;;; WELDn.LSP
;;; Date : 28 June 1995
;;; Description : Draws welding symbol
;;; bong c. deato property for Tostem HK Ltd.
;;; 2.00
;;; revi 03 July 1996: add sideweld option
;;; 2.01
;;; revi 17 September 1996 : add UCS World command to fit all ucs
;;; 2.02
;;; revi 15 July 1997 : change the weld-plan routine
;;; 3.00
;;; by Eric Wong
(defun C:hf (/ old cmdold lyold)
(tq old *error*)
(defun *error* (msg)
(if
(or
(/= msg "Function cancelled")
(= msg "quit / exit abort")
)
(princ)
(princ (strcat "\nError: " msg))
)
(tq *error* old)
(tq old nil ba nil cmdold nil lyold nil)
(princ)
);defun error
(tq cmdold (getvar "cmdecho"))
(tq lyold (getvar "clayer"))
(prompt "\nWELD.lsp Version 3.00")
(tvar "CMDECHO" 0)
(princ)
;;; default value routine
(if (= wsz nil) (tq wsz 4.0))
(princ (strcat "\nWelding size <" (rtos wsz 2 2) ">: "))
(tq a (getdist))
nator
(if (= a nil) (tq a wsz))
(tq wsz a)
(initget "Sideweld Planweld")
(tq lect (getkword "\nSideweld/<Planweld>: "))
(if (= lect "Sideweld")(weld_ct)(weld_plan))
(tq old nil)
(tvar "CMDECHO" CMDOLD)
(tvar "blipmode" 0)
(tvar "clayer" lyold)
(princ)
关于健康的英语手抄报
); end
;;;-------------------------------------------------------------
;;; weldn ction routine
(defun weld_ct (/ ipt weld-lay)
太平洋英语 (tvar "blipmode" 1)
(tq ipt (getpoint "\n Inrtion point: "))
(tq weld-lay (tblarch "layer" "PUB_HATCH"))
(if (= weld-lay nil)
(command ".layer" "M" "PUB_HATCH" "c" "6" "" "")
(tvar "clayer" "PUB_HATCH")
)
ctm是什么
(command ".inrt" "welds" ipt wsz "" pau)
(command ".explode" (entlast))
(command ".chprop" "p" "" "la" "PUB_HATCH" "")verve
)
;;; new weld plan routine
(defun weld_plan ();(/ pt1 pt2 pt3 pt4 weld-l weld-n weld-ang)
(if (= (tblarch "layer" "PUB_HATCH") nil)
(command ".layer" "M" "PUB_HATCH" "c" "6" "" "")
(tvar "clayer" "PUB_HATCH")6684
)
(tvar "blipmode" 1)
(command "ucs" "w")
(princ "\nPick points in clockwi rotation.")kenwood
(tq pt1 (getpoint "\nFrist point :")
pt2 (getpoint pt1 "\nSecond point :")
weld-l (distance pt1 pt2)
weld-n (fix (/ weld-l wsz))
weld-ang (angle pt1 pt2)
pt3 pt1
)
(command ".pline" pt1 "a")
(repeat (- weld-n 2)
(command "ce" (tq pt4 (polar pt3 weld-ang wsz)) "a" "-120")
(command "d" pt3 pt4)
(tq pt3 pt4)
)
(command "ce" (tq pt4 (polar pt3 weld-ang wsz)) "a" "-180" "")
(command "ucs" "p")
); end weld_plan
(princ "\nready to welding\n")
(princ)
【点坐标】
(defun c:vf ()
(command "osmode" "513")
(SEtQ POINT1 (GETPOINT "/n点1"))
(command "osmode" "0")
(tq yy1 (cadr POINT1))
(tq zz1 (caddr POINT1))
(tq A1 (ITOA (fiX yy1)))
(tq A2 (ITOA (fiX zz1)))
(tq a (STRCAT "屋面" A1 " " "幕墙" A2 " "))
(command"text" POINT1 "400" "0" a /n)
(tq a (entlast))
(command "change" a "" "p" "la" "装饰面进出位" "c" "bylayer" "")
(command "osmode" "673")
)
(defun c:q1 ()
(command "ucs" "")
(command "osmode" "513")
(SEtQ POINT1 (GETPOINT "/n点1"))
(command "osmode" "0")
(tq xx1 (car POINT1))
(tq yy1 (cadr POINT1))
(tq zz1 (caddr POINT1))
(tq A1 (ITOA (fiX xx1)))
(tq A2 (ITOA (fiX yy1)))
(tq A3 (ITOA (fiX zz1)))
春节小品大全
(tq a (STRCAT "X=" A1 " " "Y=" A2 " " "Z=" a3 " "))
(command"text" POINT1 "400" "0" a /n)
(tq a (entlast))
(command "change" a "" "p" "la" "坐标点" "c" "bylayer" "")
(command "osmode" "673")
)