(defun C:TL( / ss L e #h) (vl-load-com) (defun Length1(e) (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e))) (or ans (setq ans 1)) (setq #h 3 L (strcat "D00 HDPE - L" (vl-princ-to-string (* (getvar "dimlfac") (apply '+ (mapcar 'Length1 (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget (list (cons 0 "LINE,ARC,CIRCLE,POLYLINE,LWPOLYLINE,ELLIPSE,SPLINE"))))))) )))" m" ) ans (cond ((getint (strcat "\nPhuong an nhap ket qua < " (itoa ans) " > :")))(ans)) txtObj (cond ((= ans 1) (vlax-ename->vla-object (car (entsel "\nChon text ghi ket qua :")))) (T (vla-addtext (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) L (vlax-3d-point (getpoint "\n Chon diem nhap ket qua" )) #h )) ) ) (vla-put-TextString txtObj L) (vla-put-Height txtObj #h) (princ) )