Here is a sample that might get to going in the right direction
John Coon
Option Explicit
Public intRow As Integer
Public strCell As String
' Application - Excel
Public oExcel As Excel.Application
Public oBook As Excel.Workbook
Public oSheet As Excel.Worksheet
Private Sub CreateExcel()
Dim i As Integer
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add
Set oSheet = oBook.Worksheets(1)
oExcel.Visible = True
End Sub
Public Sub TextToExcel()
Dim obj As AcadEntity
Dim objText As AcadText
Dim varInsert As Variant
Dim TEXTRot As String
' Create an Excel object
CreateExcel
oExcel.Cells(1, 1).Value = "X: COORDINATE"
oExcel.Cells(1, 2).Value = "Y: COORDINATE"
oExcel.Cells(1, 3).Value = "TEXT VALUE"
oExcel.Cells(1, 4).Value = "TEXT ROTATION"
intRow = 2
For Each obj In ThisDrawing.ModelSpace
If TypeOf obj Is AcadText Then
Set objText = obj
oExcel.Cells(intRow, 3).Value = objText.TextString
oExcel.Cells(intRow, 4).Value = objText.Rotation
varInsert = objText.InsertionPoint
oExcel.Cells(intRow, 1).Value = varInsert(0)
oExcel.Cells(intRow, 2).Value = varInsert(1)
intRow = intRow + 1
End If
Next obj
End Sub
"Paul Richardson"
wrote in message
news:[email protected]...
Naresh,
There is a sample that comes
with AutoCAD. I think there
is one that pulls the data from
Excel. If not, this code has
been posted here, and in
the customization group
many times. Do a search
and let us know if your
having any problems finding
what you need. I'm bored today
if you cannot find I will write it
for you.
gl
Paul
wrote in message news:[email protected]...
Hi All
I would like to know is there any code which can pull my drawing data(Only
Text Data) which is in particular layer
Can I get into Excel Sheet
Thinking u