Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi to all,
I facing off to write several Table Cells with the below procedure, but seems that the execution time it's very slow (and it's not tied with machine where Autocad is running).
I'm using Autocad 2022, with a table drawing of more or less 30 rows and 4 columns.
Population source it's an excel file not linked, but data are read from a VBA procedure.
Please is there a way to speed up the procedure ?
Here the code
LastRow = ObjExcel.Sheets("INDICE").Range("A3").End(xlDown).Row
For MyExRow = 3 To LastRow
MyShNum = ObjExcel.Sheets("INDICE").Cells(MyExRow, 1).Value
MyDescription = ObjExcel.Sheets("INDICE").Cells(MyExRow, 2).Value
MyDATE = ObjExcel.Sheets("INDICE").Cells(MyExRow, 3).Value
Call MyTable.SetCellValue(MyTRow, 0, MyShNum)
Call MyTable.SetCellValue(MyTRow, 1, MyDescription)
Call MyTable.SetCellValue(MyTRow, 2, MyDATE)
MyDATE_B = ObjExcel.Sheets("INDICE").Cells(MyExRow, 4).Value
If MyDATE_B <> "" Then
Call MyTable.SetCellValue(MyTRow, 3, MyDATE_B)
End If
MyDATE_C = ObjExcel.Sheets("INDICE").Cells(MyExRow, 5).Value
If MyDATE_C <> "" Then
Call MyTable.SetCellValue(MyTRow, 4, MyDATE_C)
End If
MyTRow = MyTRow + 1
Next
Solved! Go to Solution.