Chuyển đến nội dung
Diễn đàn CADViet

nguyenvinh5779

Thành viên
  • Số lượng nội dung

    18
  • Đã tham gia

  • Lần ghé thăm cuối

  • Ngày trúng

    1

Bài đăng được đăng bởi nguyenvinh5779


  1. Xin cám ơn bạn

    nhưng sao không dược bạn oi !

    nho bạn chỉnh giúp  !

    có thể chỉnh chiều cao chữ bằng cách chọn 02 điểm trên màn hình khong ?

    xin cám on ban !

    (defun C:fd( / ss L e #h)
    (vl-load-com)
    (setq ent (car (entsel "\nChon text lay chieu cao text")))
    (setq #h (cdr (assoc 40 (entget ent))))

    (defun Length1(e) (/ (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)) 1000))
    (or ans (setq ans 1))
    (setq
       #h 200
       L (strcat "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"))
       (setq
       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))

    • Vote giảm 1

  2. nhờ bạn giúp dùm mình lisp này !

    mình muốn chiều cao chữ bang cach chọn trên màn hình !

    xin cám on ban !

    (defun C:fd( / ss L e #h)
    (setvar 'textsize
    (cond ((getdist (strcat "\nSpecify Area text height by two points on screen : ")))
    ((getvar 'textsize))
    )
    )

    (vl-load-com)
    (defun Length1(e) (/ (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)) 1000))
    (or ans (setq ans 1))
    (setq
          L (strcat "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"))
       (setq
       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))

    • Vote giảm 1

  3. Xin cám on bạn !

    nhưng mà bị báo lỗi bạn oi !

    ;; free lisp from cadviet.com
    ;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/60478-nh%E1%BB%9D-ch%E1%BB%89nh-s%E1%BB%ADa%C4%91o-chi%E1%BB%81u-d%C3%A0i-v%C3%A0-ghi-ra-text/
    (defun C:fd( / ss L e #h)
    (vl-load-com)
    (defun Length1(e) (/ (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)) 1000))
    (or ans (setq ans 1))
    (setq
       #h 200
       L (strcat "L : "
       (vl-princ-to-string (* (getvar "dimlfac") (apply '+
           (mapcar 'Length1 (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget (list (cons "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)
    )

    • Vote giảm 1

  4. Xin chào cả nhà  !

    Trên diễn đàn minh thay có lisp này . nhưng do nhu cầu công việc mình làm trên hệ meter

    Xin chỉ giúp chổ nào chia 1000  de ra meter !

    xin cám on !

    ;; free lisp from cadviet.com
    ;;; this lisp was downloaded from https://www.cadviet.com/forum/topic/60478-nhờ-chỉnh-sửađo-chiều-dài-và-ghi-ra-text/
    (defun C:TLu( / 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 200
       L (strcat "L : "
       (vl-princ-to-string (* (getvar "dimlfac") (apply '+
           (mapcar 'Length1 (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget (list (cons "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)
    )

    • Vote giảm 1
×