中文字幕在线亚洲三区|亚洲人成在线免费观看|亚洲h片91免费看国产|国产精品v一区二区三区|亚洲一区二区在线观看网址|亚洲欧美中文字幕在线一区|日本TS人妖系列在线专区|日本一区二区三区dvd视频在线

?
當(dāng)前位置: 首頁 >> 地理信息系統(tǒng) >>

文字延直線方向的lisp程序

0
(VL-Load-Com)
(defun c:ttt(/ Pt Pt1 Pt2 EntLine HandTxt VlaObj Tmp)
  (setq Pt1 (getpoint "n指定第一點:"))
  (setq Pt2 (getpoint "n指定下一點:"))
  (setq Pt (list (/ (+ (car Pt1) (car Pt2)) 2) (/ (+ (cadr Pt1) (cadr Pt2)) 2) (/ (+ (caddr Pt1) (caddr Pt2)) 2)))
  (command "._Line" Pt1 Pt2 "")
  (setq EntLine (entlast))
  (setq VlaObj (cons (VLAX-EName->VLA-Object EntLine) '()));;將直線轉(zhuǎn)換為VLA對象
  
  (setq HandTxt '((0 . "TEXT"))
 HandTxt (append HandTxt (list (append '(10) Pt1)))
 HandTxt (append HandTxt (list (append '(11) Pt)))
 HandTxt (append HandTxt (list (cons 40 (getdist "n指定高度:"))))
 HandTxt (append HandTxt (list (cons 72  1)))
 HandTxt (append HandTxt (list (cons 73  0)))
 HandTxt (append HandTxt (list (cons 50 (angle pt1 Pt2))))
 HandTxt (append HandTxt (list (cons 1 (getstring "n輸入文字:>")))))
  (entmake HandTxt)
  (setq HandTxt (cdr (Assoc 5 (entget (entlast)))))
  (VLR-Pers (VLR-Object-Reactor vlaObj HandTxt '((:vlr-modified . LineModefy))))
  )


(defun LineModefy(EntLine EntTxt parameter-list / Pt Pt1 Pt2)
  (setq EntTxt (entget (HandEnt (VLR-Data EntTxt))))
  (setq EntLine (entget (VLAX-VLA-Object->EName EntLine)))
  (setq Pt1 (cdr (assoc 10 EntLine)) Pt2 (cdr (assoc 11 EntLine)))
  (setq Pt (list (/ (+ (car Pt1) (car Pt2)) 2) (/ (+ (cadr Pt1) (cadr Pt2)) 2) (/ (+ (caddr Pt1) (caddr Pt2)) 2)))
  (setq EntTxt (subst (cons 50 (angle Pt1 Pt2)) (assoc 50 EntTxt) EntTxt)
 EntTxt (subst (append '(10) Pt1) (assoc 10 EntTxt) EntTxt)
 EntTxt (subst (append '(11) Pt) (assoc 11 EntTxt) EntTxt))
  (entmod EntTxt)
)
?

Powered by DLKIT 開發(fā)版 ? 2011-2012 DLCMS.NET Inc.
Copyright ? 2017-2024 南充辰汐科技有限公司

住所:南充市順慶區(qū)油院路30號南充高新孵化園內(nèi)

聯(lián)系人:劉義君

聯(lián)系電話:18781755505(微信同號)

QQ:23424830

Email : 23424830@QQ.com