<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dwg to Excel in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332090#M43365</link>
    <description>Here is a sample that might get to going in the right direction&lt;BR /&gt;
&lt;BR /&gt;
John Coon&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
&lt;BR /&gt;
Public intRow As Integer&lt;BR /&gt;
Public strCell As String&lt;BR /&gt;
&lt;BR /&gt;
' Application - Excel&lt;BR /&gt;
Public oExcel As Excel.Application&lt;BR /&gt;
Public oBook As Excel.Workbook&lt;BR /&gt;
Public oSheet As Excel.Worksheet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Sub CreateExcel()&lt;BR /&gt;
    Dim i As Integer&lt;BR /&gt;
    Set oExcel = CreateObject("Excel.Application")&lt;BR /&gt;
    Set oBook = oExcel.Workbooks.Add&lt;BR /&gt;
    Set oSheet = oBook.Worksheets(1)&lt;BR /&gt;
&lt;BR /&gt;
    oExcel.Visible = True&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Public Sub TextToExcel()&lt;BR /&gt;
    Dim obj As AcadEntity&lt;BR /&gt;
    Dim objText As AcadText&lt;BR /&gt;
    Dim varInsert As Variant&lt;BR /&gt;
    Dim TEXTRot As String&lt;BR /&gt;
' Create an Excel object&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    CreateExcel&lt;BR /&gt;
&lt;BR /&gt;
    oExcel.Cells(1, 1).Value = "X: COORDINATE"&lt;BR /&gt;
    oExcel.Cells(1, 2).Value = "Y: COORDINATE"&lt;BR /&gt;
    oExcel.Cells(1, 3).Value = "TEXT VALUE"&lt;BR /&gt;
    oExcel.Cells(1, 4).Value = "TEXT ROTATION"&lt;BR /&gt;
   intRow = 2&lt;BR /&gt;
&lt;BR /&gt;
    For Each obj In ThisDrawing.ModelSpace&lt;BR /&gt;
        If TypeOf obj Is AcadText Then&lt;BR /&gt;
            Set objText = obj&lt;BR /&gt;
            oExcel.Cells(intRow, 3).Value = objText.TextString&lt;BR /&gt;
            oExcel.Cells(intRow, 4).Value = objText.Rotation&lt;BR /&gt;
            varInsert = objText.InsertionPoint&lt;BR /&gt;
            oExcel.Cells(intRow, 1).Value = varInsert(0)&lt;BR /&gt;
            oExcel.Cells(intRow, 2).Value = varInsert(1)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
            intRow = intRow + 1&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next obj&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Paul Richardson" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:4851864@discussion.autodesk.com...&lt;BR /&gt;
Naresh,&lt;BR /&gt;
&lt;BR /&gt;
There is a sample that comes&lt;BR /&gt;
with AutoCAD. I think there&lt;BR /&gt;
is one that pulls the data from&lt;BR /&gt;
Excel. If not, this code has&lt;BR /&gt;
been posted here, and in&lt;BR /&gt;
the customization group&lt;BR /&gt;
many times. Do a search&lt;BR /&gt;
and let us know if your&lt;BR /&gt;
having any problems finding&lt;BR /&gt;
what you need. I'm bored today&lt;BR /&gt;
if you cannot find I will write it&lt;BR /&gt;
for you.&lt;BR /&gt;
&lt;BR /&gt;
gl&lt;BR /&gt;
Paul&lt;BR /&gt;
&lt;NARESH&gt; wrote in message news:4851859@discussion.autodesk.com...&lt;BR /&gt;
Hi  All&lt;BR /&gt;
 I would like to know is there any code which can pull my drawing data(Only&lt;BR /&gt;
Text Data) which is in particular layer&lt;BR /&gt;
Can I get into Excel Sheet&lt;BR /&gt;
  Thinking u&lt;/NARESH&gt;&lt;/NOSPAM&gt;</description>
    <pubDate>Mon, 23 May 2005 10:37:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-05-23T10:37:49Z</dc:date>
    <item>
      <title>Dwg to Excel</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332088#M43363</link>
      <description>Hi  All &lt;BR /&gt;
 I would like to know is there any code which can pull my drawing data(Only Text Data) which is in particular layer&lt;BR /&gt;
Can I get into Excel Sheet&lt;BR /&gt;
  Thinking u</description>
      <pubDate>Fri, 20 May 2005 14:57:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332088#M43363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-20T14:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dwg to Excel</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332089#M43364</link>
      <description>Naresh,&lt;BR /&gt;
&lt;BR /&gt;
There is a sample that comes&lt;BR /&gt;
with AutoCAD. I think there&lt;BR /&gt;
is one that pulls the data from&lt;BR /&gt;
Excel. If not, this code has&lt;BR /&gt;
been posted here, and in&lt;BR /&gt;
the customization group&lt;BR /&gt;
many times. Do a search&lt;BR /&gt;
and let us know if your&lt;BR /&gt;
having any problems finding&lt;BR /&gt;
what you need. I'm bored today&lt;BR /&gt;
if you cannot find I will write it&lt;BR /&gt;
for you.&lt;BR /&gt;
&lt;BR /&gt;
gl&lt;BR /&gt;
Paul&lt;BR /&gt;
&lt;NARESH&gt; wrote in message news:4851859@discussion.autodesk.com...&lt;BR /&gt;
Hi  All&lt;BR /&gt;
 I would like to know is there any code which can pull my drawing data(Only &lt;BR /&gt;
Text Data) which is in particular layer&lt;BR /&gt;
Can I get into Excel Sheet&lt;BR /&gt;
  Thinking u&lt;/NARESH&gt;</description>
      <pubDate>Fri, 20 May 2005 15:04:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332089#M43364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-20T15:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dwg to Excel</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332090#M43365</link>
      <description>Here is a sample that might get to going in the right direction&lt;BR /&gt;
&lt;BR /&gt;
John Coon&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
&lt;BR /&gt;
Public intRow As Integer&lt;BR /&gt;
Public strCell As String&lt;BR /&gt;
&lt;BR /&gt;
' Application - Excel&lt;BR /&gt;
Public oExcel As Excel.Application&lt;BR /&gt;
Public oBook As Excel.Workbook&lt;BR /&gt;
Public oSheet As Excel.Worksheet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Sub CreateExcel()&lt;BR /&gt;
    Dim i As Integer&lt;BR /&gt;
    Set oExcel = CreateObject("Excel.Application")&lt;BR /&gt;
    Set oBook = oExcel.Workbooks.Add&lt;BR /&gt;
    Set oSheet = oBook.Worksheets(1)&lt;BR /&gt;
&lt;BR /&gt;
    oExcel.Visible = True&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Public Sub TextToExcel()&lt;BR /&gt;
    Dim obj As AcadEntity&lt;BR /&gt;
    Dim objText As AcadText&lt;BR /&gt;
    Dim varInsert As Variant&lt;BR /&gt;
    Dim TEXTRot As String&lt;BR /&gt;
' Create an Excel object&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    CreateExcel&lt;BR /&gt;
&lt;BR /&gt;
    oExcel.Cells(1, 1).Value = "X: COORDINATE"&lt;BR /&gt;
    oExcel.Cells(1, 2).Value = "Y: COORDINATE"&lt;BR /&gt;
    oExcel.Cells(1, 3).Value = "TEXT VALUE"&lt;BR /&gt;
    oExcel.Cells(1, 4).Value = "TEXT ROTATION"&lt;BR /&gt;
   intRow = 2&lt;BR /&gt;
&lt;BR /&gt;
    For Each obj In ThisDrawing.ModelSpace&lt;BR /&gt;
        If TypeOf obj Is AcadText Then&lt;BR /&gt;
            Set objText = obj&lt;BR /&gt;
            oExcel.Cells(intRow, 3).Value = objText.TextString&lt;BR /&gt;
            oExcel.Cells(intRow, 4).Value = objText.Rotation&lt;BR /&gt;
            varInsert = objText.InsertionPoint&lt;BR /&gt;
            oExcel.Cells(intRow, 1).Value = varInsert(0)&lt;BR /&gt;
            oExcel.Cells(intRow, 2).Value = varInsert(1)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
            intRow = intRow + 1&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next obj&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Paul Richardson" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:4851864@discussion.autodesk.com...&lt;BR /&gt;
Naresh,&lt;BR /&gt;
&lt;BR /&gt;
There is a sample that comes&lt;BR /&gt;
with AutoCAD. I think there&lt;BR /&gt;
is one that pulls the data from&lt;BR /&gt;
Excel. If not, this code has&lt;BR /&gt;
been posted here, and in&lt;BR /&gt;
the customization group&lt;BR /&gt;
many times. Do a search&lt;BR /&gt;
and let us know if your&lt;BR /&gt;
having any problems finding&lt;BR /&gt;
what you need. I'm bored today&lt;BR /&gt;
if you cannot find I will write it&lt;BR /&gt;
for you.&lt;BR /&gt;
&lt;BR /&gt;
gl&lt;BR /&gt;
Paul&lt;BR /&gt;
&lt;NARESH&gt; wrote in message news:4851859@discussion.autodesk.com...&lt;BR /&gt;
Hi  All&lt;BR /&gt;
 I would like to know is there any code which can pull my drawing data(Only&lt;BR /&gt;
Text Data) which is in particular layer&lt;BR /&gt;
Can I get into Excel Sheet&lt;BR /&gt;
  Thinking u&lt;/NARESH&gt;&lt;/NOSPAM&gt;</description>
      <pubDate>Mon, 23 May 2005 10:37:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332090#M43365</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-23T10:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dwg to Excel</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332091#M43366</link>
      <description>hey john thanks i am trying it tomorrow &amp;amp; i will be back to day after tomorrow</description>
      <pubDate>Tue, 24 May 2005 14:23:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332091#M43366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dwg to Excel</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332092#M43367</link>
      <description>Naresh,&lt;BR /&gt;
Sorry clicked on wrong section.&lt;BR /&gt;
&lt;BR /&gt;
Replaced this. You can arrange them in the order you need.&lt;BR /&gt;
&lt;BR /&gt;
CreateExcel&lt;BR /&gt;
&lt;BR /&gt;
    oExcel.Cells(1, 1).Value = "X: COORDINATE"&lt;BR /&gt;
    oExcel.Cells(1, 2).Value = "Y: COORDINATE"&lt;BR /&gt;
    oExcel.Cells(1, 3).Value = "TEXT VALUE"&lt;BR /&gt;
    oExcel.Cells(1, 4).Value = "TEXT ROTATION"&lt;BR /&gt;
    oExcel.Cells(1, 5).Value = "LAYER"&lt;BR /&gt;
   intRow = 2&lt;BR /&gt;
&lt;BR /&gt;
    For Each obj In ThisDrawing.ModelSpace&lt;BR /&gt;
        If TypeOf obj Is AcadText Then&lt;BR /&gt;
            Set objText = obj&lt;BR /&gt;
            oExcel.Cells(intRow, 3).Value = objText.TextString&lt;BR /&gt;
            oExcel.Cells(intRow, 4).Value = objText.Rotation&lt;BR /&gt;
            oExcel.Cells(intRow, 5).Value = objText.Layer&lt;BR /&gt;
            varInsert = objText.InsertionPoint&lt;BR /&gt;
            oExcel.Cells(intRow, 1).Value = varInsert(0)&lt;BR /&gt;
            oExcel.Cells(intRow, 2).Value = varInsert(1)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;NARESH&gt; wrote in message news:4854497@discussion.autodesk.com...&lt;BR /&gt;
hey john thanks i am trying it tomorrow &amp;amp; i will be back to day after &lt;BR /&gt;
tomorrow&lt;/NARESH&gt;</description>
      <pubDate>Wed, 25 May 2005 11:43:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dwg-to-excel/m-p/1332092#M43367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-25T11:43:19Z</dc:date>
    </item>
  </channel>
</rss>

