明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1539|回复: 1

一个程序,请帮忙‘看看!

[复制链接]
发表于 2005-6-10 10:20:00 | 显示全部楼层 |阅读模式
程序功能:对已知块进行属性输出。 程序: Public blkColl As AcadBlocks Public BlkObj As AcadBlock Public mspace As AcadModelSpace
Public count As Integer
Public I As Integer
Public elem As Object
Public subelem As Object Private Sub CommandButton1_Click() Set mspace = ThisDrawing.ModelSpace Set blkColl = ThisDrawing.Blocks count = blkColl.count ListBox1.Clear
For I = 0 To count - 1
ListBox1.AddItem blkColl.Item(I).Name
Next For Each elem In blkColl
If elem.Name = "DATA" Then
For Each subelem In elem
Label2.Caption = subelem.TagString
Label1.Caption = subelem.TextString
Label3.Caption = subelem.PromptString
Next
End If
Next End Sub 其中块名为“DATA”; 问题:subelem.TextString中只能显示先前的块属性,在cad中修改后的块属性却无法显示。 请帮我找找问题! 谢谢!
发表于 2005-6-10 10:40:00 | 显示全部楼层
Dim EntAtt As Variant
EntAtt = elem.GetAttributes Dim i For i=LBound(EntAtt ) to Ubound(EntAtt )
Label2.Caption = EntAtt(i) .TagString
Label1.Caption = EntAtt(i).TextString
Label3.Caption = EntAtt(i).PromptString
Next
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-27 14:39 , Processed in 0.166854 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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