MTEXT对齐曲线
(vl-load-com)
(setq es (entsel)
entpt (osnap (cadr es) "_nea")
ang (angle '(0 0 0)
(vlax-curve-getFirstDeriv
(vlax-ename->vla-object (car es))
(vlax-curve-getParamAtPoint
(vlax-ename->vla-object (car es))
entpt
)
)
)
)
(if (and (> ang (/ pi 2)) (<= ang (* pi 1.5)))
(setq ang (+ ang pi))
)
(setq hght (getreal "\nText Height : "))
(setq
mspace (vla-get-modelspace
(vla-get-activedocument (vlax-get-acad-object))
)
)
(setq mtextobj (vla-addMText
mspace
(vlax-3d-point entpt)
0.0
"AUTOCAD"
)
)
(vla-put-attachmentPoint
mtextobj
acAttachmentPointMiddleCenter
)
(vla-put-insertionPoint mtextobj (vlax-3d-point entpt))
(vla-put-Rotation mtextobj ang)
(vla-put-Height mtextobj hght)
(vla-put-Color mtextobj 7)
(vla-put-backgroundfill mtextobj :vlax-true)
感谢楼主分享MTEXT对齐曲线 学习一下~~~~~~~ 认真学习学习。感谢分享。
页:
[1]