아래처럼 .net코드를 짜보았는데요..
문제가 있습니다….ㅠ
t1.Text = acAtt.Tag
t2.Text = acAtt.Prompt
t3.Text = acAtt.TextString
이 부분에서
Tag와 Prompt는 아주 잘 불러오는데
TextString는 불러오지 못합니다…
어디가 잘못되어서 벨류값을 가져오지 못하는건가요??ㅠ
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim acCurDb As Database = acDoc.Database
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
Dim acBlkTbl As BlockTable
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)
Dim sLayerName As String = “GG”
If acBlkTbl.Has(sLayerName) = True Then
Dim blkRecId As ObjectId = ObjectId.Null
blkRecId = acBlkTbl(“GG”)
Dim acBlkTblRec As BlockTableRecord
acBlkTblRec = acTrans.GetObject(blkRecId, OpenMode.ForRead)
If acBlkTblRec.HasAttributeDefinitions Then
For Each objID As ObjectId In acBlkTblRec
Dim dbObj As DBObject = acTrans.GetObject(objID, OpenMode.ForRead)
If TypeOf dbObj Is AttributeDefinition Then
Dim acAtt As AttributeDefinition = dbObj
If acAtt.Tag = “CEIL” Then
t1.Text = acAtt.Tag
t2.Text = acAtt.Prompt
t3.Text = acAtt.TextString
End If
End If
Next
End If
End If
End Using
End Sub
End Class