ljpnb 发表于 2005-4-10 20:17:00

[求助]问一个很菜的问题

我对VBA可以说一点都不懂,以前对VL比较有兴趣,现在也想学学VBA,这不想弄个简单的程序都写不下去了,大家指点一下,先看看程序:
Sub Example_TextString()
                       ' This example creates a text object in model space.
                       ' It then returns the text string for that object.
                       
                       Dim textObj As AcadText
                       Dim text As String
                       Dim basePnt As Variant
                       
                       
                       ' Define the text object
                       ThisDrawing.Utility.GetEntity textObj, basePnt, "Select an object"
                       text = ThisDrawing.Utility.GetString("Enter new string")
                       ......
                                                       
End Sub
       
当中省略号部份我是想把TEXT的内容赋予textobj并更新,可找来找去不知道用什么函数来实现,不象vlisp里有vla-put-textstring函数,大家指点一下。谢谢。。。。

mccad 发表于 2005-4-10 20:51:00

textObj.TextString=text
textObj.Update
是不是比VL简单得多

ljpnb 发表于 2005-4-10 21:03:00

多谢mccad ,确实简单多了,在这之前我写过
text      =textObj.TextString ,把text的值在一个消息框中显示出来,原来反过来就是另外一种用法。其实最关键的是我不知道从何入门?我想还是从一些简单的程序学起,还望各位多多指点!
页: [1]
查看完整版本: [求助]问一个很菜的问题