马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - (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)
[size=1.2em]
|