It looks like you're new here. If you want to get involved, click one of these buttons!
Having spent a week in a failed attempt to get Excel to talk reliably with BricsCAD, I am now considering approaching it the other direction. I.e. Accessing information in an Excel spreadsheet, from VBA embedded in an AutoCAD drawing.
The reason I am posting, is in hopes that someone can confirm for me that this is likely to work reliably. I would rather not spend another 1 1/2 weeks going down a bad road.
Dim exapp As Excel.Application
Dim wsheet As Excel.Worksheet
Dim cll As Excel.Range
Dim rg As Excel.Range
Dim pt(2) As Double
Set exapp = CreateObject("Excel.Application")
exapp.Visible = True
Set wsheet = exapp.ActiveSheet
If wsheet.Name = "Test" Then
Set rg = wsheet.Range(Cells(1, 2), Cells(8, 2))
pt(0) = 0: pt(1) = 0: pt(2) = 0
For Each cll In rg
ThisDrawing.ModelSpace.AddText cll.Value, pt, 0.16
pt(0) = pt(0) + 1
pt(1) = pt(1) + 1
If Not exapp Is Nothing Then
Can anyone say this approach will be reliable?
[Note that when I preview some lines of text get very large. I don't know why, but the forum has been doing some random formatting on its own.]