明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1633|回复: 1

如何用程序实现多文本换行?(在线等待,谢谢!!)

[复制链接]
发表于 2003-3-14 18:12 | 显示全部楼层 |阅读模式
我想用VB在CAD中写多文本,可不知怎么换行,在CAD中实现如下:
12345
6789

用以下代码,可不行,请问各位高手如何解决?谢谢!!!!


Dim MtextObj As AcadMText
Dim MtextString As String
Dim InsertPoint(0 To 2) As Double
Dim Width As Double
Width = 45
InsertPoint(0) = 50: InsertPoint(1) = 20: InsertPoint(2) = 0
MtextString = ""
MtextString = MtextString & "012345" + Chr(13) + Chr(10)
MtextString = MtextString & "6789"
AcadApp.ActiveDocument.ActiveTextStyle.fontFile = "c:/windows/fonts/simsun.ttf"
Set MtextObj = AcadApp.ActiveDocument.ModelSpace.AddMText(InsertPoint, Width, MtextString)
发表于 2003-3-14 18:56 | 显示全部楼层

请查看以下二次开发栏目的文章

http://www.mjtd.com/a2/list.asp?id=107
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-4 21:21 , Processed in 3.326873 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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