明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: mikewolf2k

我收集的一些vb专题源程序

    [复制链接]
发表于 2005-1-20 14:29 | 显示全部楼层

你好:

我弄了很久,无法将图面的数字赋值给A,烦请高手指教,多谢!

图面 100

选择集 text

A= ThisDrawing.ModelSpace.text

A值为0

发表于 2005-1-20 18:24 | 显示全部楼层

reply

你要先得到text对象,然后读取它的属性值如下autocad帮助文件中的例子)
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 insertionPoint(0 To 2) As Double
    Dim height As Double
    
    ' Define the text object
    text = "Hello, World."
    insertionPoint(0) = 2: insertionPoint(1) = 2: insertionPoint(2) = 0
    height = 0.5
    
    ' Create the text object in model space
    Set textObj = ThisDrawing.ModelSpace.AddText(text, insertionPoint, height)
'赋值 ZoomAll ' Return the current text string for the object text = textObj.textString '读属性 MsgBox "The TextString property equals: " & text, vbInformation, "TextString Example" End Sub
发表于 2005-1-26 00:27 | 显示全部楼层
好东西。
发表于 2005-5-3 00:58 | 显示全部楼层
谢谢楼主。。啊。。顶。。。。
发表于 2005-5-7 17:24 | 显示全部楼层
下啦很多有用的东西,不顶一下对不起自己呀!
发表于 2005-5-9 01:14 | 显示全部楼层
楼主辛苦了
发表于 2005-5-10 10:57 | 显示全部楼层
up
发表于 2005-5-24 00:10 | 显示全部楼层
真是感谢!辛苦了!
发表于 2005-5-24 21:50 | 显示全部楼层
不错,多谢!!!!


但是我现在没用到。


多上传别的关于画图标注的源代码!!


谢谢!!!!
发表于 2005-5-26 17:23 | 显示全部楼层
好,很好,非常好!!!!谢谢!特别感谢!!!!

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-27 09:04 , Processed in 0.213617 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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