明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1455|回复: 0

[图元] 如何遍历块属性

[复制链接]
发表于 2015-2-28 11:16 | 显示全部楼层 |阅读模式
  1. Dim db As Database = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database
  2. Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
  3. Dim ent As PromptEntityResult = ed.GetEntity("请选择图框块")
  4.         '判断是否选择成功
  5.         If ent.Status = PromptStatus.OK Then
  6.             Using transaction As Transaction = db.TransactionManager.StartTransaction()
  7.                 '获取选择的实体
  8.                 Dim entity1 As Entity
  9.                 entity1 = DirectCast(transaction.GetObject(ent.ObjectId, OpenMode.ForRead, True), Entity)
如上代码,选择一个块后,如何实现遍历该块里的所有属性?(需要块中属性名称及属性值)

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

本版积分规则

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

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

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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