Community
Hello!!
I have created several Tables with;
Dim td = new Table()
Now, i want to find a specific Table in ModelSpace but i donĀ“t know how to do.
I can search all object of type Table with next code; The problem is that i dont know how to diferenciate a Table with others Tables.
<CommandMethod("IterateTables")> _ Public Sub IterateTables() Dim doc As Document = Application.DocumentManager.MdiActiveDocument Dim db As Database = doc.Database Dim ed As Editor = doc.Editor Dim objId As ObjectId = Nothing Dim i As Integer = 0 Using tr As Transaction = doc.TransactionManager.StartTransaction Dim bt As BlockTable = DirectCast(tr.GetObject(doc.Database.BlockTableId, OpenMode.ForRead), BlockTable) Dim btr As BlockTableRecord = DirectCast(tr.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForRead), BlockTableRecord) For Each objId In btr If objId.ObjectClass.DxfName.ToUpper = "ACAD_TABLE" Then i += 1 MsgBox("TABLE: " & i.ToString) End If Next tr.Commit() End Using doc = Nothing db = Nothing ed = Nothing objId = Nothing End Sub
Can i set a name to a Table? or can i asociate attributes to aTable?
Thanks,
Ane