找回密码
 [加入论坛]
查看: 1549|回复: 3

[转帖]能生成各种定位方式文本的程序

[复制链接]
2443725 发表于 2004-10-3 00:21 | 显示全部楼层 |阅读模式
<><FONT face=宋体>(defun c:ttt (/ pt txt )
  (if (setq pt (getpoint "\nInsert Point: "))
    (progn
      (setq txt        (vla-addtext
                  (vla-get-modelspace
                    (vla-get-activedocument (vlax-get-acad-object))
                  )
                  "This is my test text"
                  (vlax-3d-point pt)
                  40.
                )
      )
      (mapcar
        '(lambda (x / t1 insp)
           (setq t1 (vla-copy txt))
           (vla-move
             t1
             (vlax-3d-point pt)
             (setq
               insp (vlax-3d-point (setq pt (polar pt (* 0.5 pi) 50)))
             )
           )
           (vla-put-alignment t1 (eval x))
           (vla-put-textalignmentpoint t1 insp)
         )
        '(acAlignmentCenter
           acAlignmentRight
           acAlignmentAligned
           acAlignmentMiddle
           acAlignmentFit
           acAlignmentTopLeft
           acAlignmentTopCenter
           acAlignmentTopRight
           acAlignmentMiddleLeft
           acAlignmentMiddleCenter
           acAlignmentMiddleRight
           acAlignmentBottomLeft
           acAlignmentBottomCenter
           acAlignmentBottomRight
          )
      )
    )
  )
  (princ)
)</FONT></P>
Michael_66 发表于 2004-10-3 17:34 | 显示全部楼层
谢谢提供源程序,奖励功能现在不能使用。
回复 顶 踩

使用道具 举报

swaywood 发表于 2004-10-4 07:56 | 显示全部楼层
什么叫定位方式文本?
回复 顶 踩

使用道具 举报

hpy 发表于 2004-10-4 17:56 | 显示全部楼层
<DIV class=quote><B>以下是引用<I>swaywood</I>在2004-10-3 23:56:15的发言:</B>
什么叫定位方式文本?</DIV>
<>我也想知道什么叫定位方式文本。</P>
回复 顶 踩

使用道具 举报

您需要登录后才可以回帖 登录 | [加入论坛]

本版积分规则

手机版|化工技术网- 赠人玫瑰 手有余香 ( 苏ICP备14035884号 )

GMT+8, 2026-12-1 16:17

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表