<?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: Data Extraction Using .Net in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9260906#M55004</link>
    <description>&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have same requirement , can you please help me here.&lt;/P&gt;&lt;P&gt;If any sample code available for read text value from dwg file will be more appreciable.&lt;/P&gt;&lt;P&gt;if you have any sample code you can share with me on jatin.vyas@rigelnetworks.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i tried below code it gives me below error ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code :::&lt;/P&gt;&lt;P&gt;string fileName = @"C:\Users\rigel.DESKTOP-5OT3V45\Downloads\Sample.dwg";&lt;BR /&gt;Document acDoc = AcApplication.DocumentManager.Open(fileName);&lt;BR /&gt;//acDoc =&lt;BR /&gt;var ed = acDoc.Editor;&lt;BR /&gt;var selMText = new TypedValue[1];&lt;BR /&gt;selMText.SetValue(new TypedValue(0, "MTEXT"), 0);&lt;BR /&gt;var MTextObjs = ed.SelectAll(new SelectionFilter(selMText));&lt;/P&gt;&lt;P&gt;using (var Transaction = acDoc.Database.TransactionManager.StartTransaction())&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (ObjectId MTextObjId in MTextObjs.Value.GetObjectIds())&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var current_MTextObj = Transaction.GetObject(MTextObjId, OpenMode.ForWrite) as MText;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string temp = current_MTextObj.Text;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if (current_MTextObj.Text.Equals(TextYouNeed))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // return current_MTextObj;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // or&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do somehting else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Error::&lt;/P&gt;&lt;P&gt;System.IO.FileNotFoundException: 'Could not load file or assembly 'Acdbmgd, Version=23.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.'&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jatin Vyas.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2020 07:31:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-20T07:31:42Z</dc:date>
    <item>
      <title>Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3504140#M54984</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi Guys,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to extract data from AutoCad Drawing using C# or VB.Net.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Title Block &lt;U&gt;&lt;STRONG&gt;which is not inserted using attributes&lt;/STRONG&gt;&lt;/U&gt;. It has some horizontal &amp;amp; vertical lines drawn &amp;nbsp;to &lt;STRONG&gt;look like a table&lt;/STRONG&gt; and text added between them.&amp;nbsp;&lt;STRONG&gt;See the attchment.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to extract data from that and display in Ms-Excel or in a datagridview.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know how to do it ?????&lt;/P&gt;&lt;P&gt;It would be very helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank You&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 11:08:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3504140#M54984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-18T11:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3504302#M54985</link>
      <description>&lt;P&gt;Personally I think that using attributes is more efficient than using plain text.&amp;nbsp; You can more easilly create a routine to select the block containing the attributes and also since you would know what data type is expected on each attribute validate it before you extract it.&amp;nbsp; There are many sample around on how to create selection sets, extract attributes, etc.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 13:03:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3504302#M54985</guid>
      <dc:creator>HJohn1</dc:creator>
      <dc:date>2012-06-18T13:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3504566#M54986</link>
      <description>&lt;P&gt;Upload your drawing with this block (&amp;lt; A2010),&lt;/P&gt;&lt;P&gt;maybe I can help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2012 15:02:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3504566#M54986</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-18T15:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3505976#M54987</link>
      <description>&lt;P&gt;hi you can't extract plain text from a block. You have to use attribut.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Autocad have a subroutine for extract attribut. No need à code vb.net for doing this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;++&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 10:39:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3505976#M54987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-19T10:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3505984#M54988</link>
      <description>&lt;P&gt;Sorry, but I can to do it easy,the same way as for constant attributes&lt;/P&gt;&lt;P&gt;using BlockTableRecord's ObjectIds of this BlockReference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2012 10:43:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3505984#M54988</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-19T10:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3507666#M54989</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the delay in uploading the drawing file(.dwg).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First Task:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to extract all the text from the drawing using C# or VB.Net and display it in notepad or excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Task:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to fetch only the text data from the left bottom corner(BOM) and the right bottom corner(Title Block) in the same format as it is displayed i autocad drawing and send it to excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how to do it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 06:07:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3507666#M54989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-20T06:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3507846#M54990</link>
      <description>&lt;P&gt;In other words you want to retrive:&lt;/P&gt;&lt;P&gt;"AP-0298" and "Sample"&lt;/P&gt;&lt;P&gt;Or I'm wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You wrote&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;I need to extract all the text from the drawing using C# or VB.Net and display it in notepad or excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just the text only or you need to get mtext as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#800000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 08:29:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3507846#M54990</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-20T08:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3507950#M54991</link>
      <description>&lt;P&gt;Hallex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes...&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 11:04:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3507950#M54991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-20T11:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3508238#M54992</link>
      <description>&lt;P&gt;Something wrong with your drawing, there are too many invisible texts,&lt;/P&gt;&lt;P&gt;see complete&amp;nbsp;code:&lt;/P&gt;&lt;PRE&gt;using System;
using System.IO;
using System.Text;
using System.Collections;

using System.Collections.Generic;
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Interop.Common;
using Autodesk.AutoCAD.Interop;
using acApp = Autodesk.AutoCAD.ApplicationServices.Application;

using Microsoft.Office.Interop.Excel;
using Excel = Microsoft.Office.Interop.Excel;

// This line is not mandatory, but improves loading performances
[assembly: CommandClass(typeof(AutoCAD_CSharp_plug_in1.ExcelReport))]

namespace AutoCAD_CSharp_plug_in1
{
    class ExcelReport
    {
        [CommandMethod("xlrep")]
        public static void TextSelectToExcel()
        {
            string title = "";
            string jobno = "";
            List&amp;lt;string&amp;gt; alltexts = new List&amp;lt;string&amp;gt;();

            Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
            Database db = doc.Database;
            string xlFileName = (string)Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("dwgprefix");
            string dwgname = (string)Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("dwgname");
            dwgname = dwgname.Substring(0, dwgname.Length - 4) + ".xlsx";
            xlFileName = Path.Combine(xlFileName, dwgname);

            Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("osmode", 0);
            try
            {
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                PromptPointOptions ppo = new PromptPointOptions("\nSelect a first corner of table: ");
                PromptPointResult ppr = ed.GetPoint(ppo);
                if (ppr.Status != PromptStatus.OK) return;
                PromptCornerOptions pco = new PromptCornerOptions("\nOther corner: ", ppr.Value);
                PromptPointResult pcr = ed.GetCorner(pco);
                if (pcr.Status != PromptStatus.OK) return;
                Point3d p1 = ppr.Value;
                Point3d p2 = pcr.Value;
                if (p1.X == p2.X || p1.Y == p2.Y)
                {
                    ed.WriteMessage("\nInvalid coordinate specification");
                    return;
                }
                TypedValue[] tvs = new TypedValue[]
            {new TypedValue(0, "text")

            };
                SelectionFilter filter = new SelectionFilter(tvs);

                PromptSelectionResult result = ed.SelectCrossingWindow(p1, p2, filter);
                if (result.Status != PromptStatus.OK) return;
                Dictionary&amp;lt;Point3d, string&amp;gt; txtlist = new Dictionary&amp;lt;Point3d, string&amp;gt;();

                foreach (SelectedObject selobj in result.Value)
                {

                    DBObject obj = tr.GetObject(selobj.ObjectId, OpenMode.ForRead) as DBObject;
                    DBText txt = obj as DBText;
                    if (txt != null)
                    {
                        string strtext = txt.TextString;
                        Point3d pp = txt.Position;
                        if (!txtlist.ContainsKey(pp))
                            txtlist.Add(pp, strtext);
                    }

                }

                List&amp;lt;Point3d&amp;gt; ptlist = new List&amp;lt;Point3d&amp;gt;(txtlist.Keys);

                ptlist.Sort(delegate(Point3d pa, Point3d pb)
                { return (pa.Y.CompareTo(pb.Y)); });

                ptlist.Reverse();

                title = txtlist[ptlist[6]];
                jobno = txtlist[ptlist[5]];

                Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(string.Format
                ("Title: {0}\nJob No.: {1}", title, jobno));

                //---------------------------------------------------------------------------//

                PromptSelectionResult result2 = ed.SelectAll(filter);

                if (result2.Status != PromptStatus.OK) return;



                foreach (SelectedObject selobj2 in result2.Value)
                {

                    DBObject obj = tr.GetObject(selobj2.ObjectId, OpenMode.ForRead) as DBObject;
                    DBText txt2 = obj as DBText;
                    if (txt2 != null)
                    {
                        string strtext = txt2.TextString;
                       if (strtext!=string.Empty)
                        alltexts.Add(strtext);
                    }

                }



            }

            //---------------------------------------------------------------------------//
            Excel.Application xlApp;
            Excel.Workbooks xlBooks;
            Excel.Workbook xlBook;
            Excel.Sheets xlSheets;
            Excel.Worksheet xlSheet;
            Excel.Range xlRange;
          
                xlApp = new Excel.Application();

                xlApp.Visible = false;

                xlApp.SheetsInNewWorkbook = 1;

                xlApp.Workbooks.Add(Type.Missing);

                xlBooks = (Excel.Workbooks)xlApp.Workbooks;
                xlBook = (Excel.Workbook)xlBooks[1];
                xlBook.Saved = true;
                xlApp.DisplayAlerts = false;


                xlSheets = (Excel.Sheets)xlBook.Worksheets;
                xlSheet = (Excel.Worksheet)xlSheets.get_Item(1);

                xlRange = (Excel.Range)xlSheet.Range["A1"];
                xlRange.ColumnWidth = 20;
                xlRange.NumberFormat = "@";
                int row = 1;
                xlRange.Cells[row, 1] = title;

                row = 1;

                xlRange = (Excel.Range)xlSheet.Range["B1"];
                xlRange.ColumnWidth = 20;
                xlRange.NumberFormat = "@";
                xlRange.Cells[row, 1] = jobno;

                xlRange = (Excel.Range)xlSheet.Range["A2"];
                int r = 1;
                foreach (string s in alltexts)
                {
                    xlRange.Cells[r, 1] = s;
                    r += 1;
                }
         
                //Save workbook
                xlBook.SaveAs(xlFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
                    Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
                xlApp.Workbooks.Close();
                xlApp.Quit();
                //or
                // xlApp.Windows[1].Close(false, Type.Missing, Type.Missing);
            }
            catch (System.Exception ex)
            {
                Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(
                    "\n{0}", ex.Message);
            }
            finally
            {
                Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("Remove blank rows from Excel file manually");
            }
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#800000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 13:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3508238#M54992</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-20T13:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3508474#M54993</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hallex,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try using this, but i think it asks for user to select some objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me try this now...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 15:04:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3508474#M54993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-20T15:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3508484#M54994</link>
      <description>&lt;P&gt;Let me know after what I need to change in there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#008000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 15:07:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3508484#M54994</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-20T15:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3509534#M54995</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hallex,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your code but everytime it asks for users selection. I can work more on your code and get it done my way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have figured out one more method where i can get all the text/string available in &lt;SPAN&gt;Entire&lt;/SPAN&gt;&amp;nbsp;Autocad Drawing, and also i am able to send it to excel file using OLEDB. I have done it in &lt;STRONG&gt;VB.Net. &lt;/STRONG&gt;I will change the code to C# once i finish my task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the problem is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;It is taking lot of time to finish the execution and sometimes it is also entering into inifinte loop.&lt;/LI&gt;&lt;LI&gt;I am unable to link one text to another.&lt;STRONG&gt;(&lt;/STRONG&gt;E.g:&lt;STRONG&gt; JOB NO is AP-0298 &lt;/STRONG&gt;&amp;amp; &lt;STRONG&gt;PART-MARK is 09-401) &lt;/STRONG&gt;Check the screenshot of the excel file.&lt;/LI&gt;&lt;LI&gt;The text/string we are getting in excel is jumbled up and due to hidden text in drawing there are lot of empty rows in excel.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The solution i thought for linking the text with one another is.&lt;/P&gt;&lt;P&gt;Getting the Position (Co-ordinates) of the title (&lt;STRONG&gt;JOB NO)&amp;nbsp;&lt;/STRONG&gt;and assuming that X axis is same, we will give a specific range of Y co-ordinates that if a text/string exists in this range grab the text. and store it in an array/list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then we will have all the Heading/Title in one array and the values in one array. &lt;STRONG&gt;This is the idea for the Right Bottom table(Title Block)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the Left bottom table(&lt;STRONG&gt;BOM&lt;/STRONG&gt;). Search for the string &lt;STRONG&gt;Mark&lt;/STRONG&gt; and increment only the Y Co-ordinate range and grab all the text untill the range gets bigger(&lt;STRONG&gt;As the last row and the first row height is big&lt;/STRONG&gt;) And the same logic for other columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this idea but i am not sure how to do it.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2012 05:29:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3509534#M54995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-21T05:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3509588#M54996</link>
      <description>&lt;P&gt;It is very scrupulous operation because all of the texts&lt;/P&gt;&lt;P&gt;&amp;nbsp;have a different coordinates of Y in the row, so I can't do the correct sorting&lt;/P&gt;&lt;P&gt;of these texts according this Y value, sorry, it is impossible to me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2012 06:54:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3509588#M54996</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-21T06:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3509604#M54997</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi Hallex,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am really interested in doing this, as this is quite challenging. Is there any possible approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can give me some hints, as this is my first try in autocad customization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2012 07:23:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3509604#M54997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-21T07:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3511720#M54998</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi Hallex,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have sucessfully copleted the task with a help of very senior person who has experience on Autocad customisation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was vary challenging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You for your time and responses&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2012 12:24:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3511720#M54998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-22T12:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3512066#M54999</link>
      <description>&lt;P&gt;Good to hear,&lt;/P&gt;&lt;P&gt;Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#800000"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2012 14:36:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/3512066#M54999</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-06-22T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/6926101#M55000</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Santosh,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to extract the Text from the dwg files - we have 100's of files from which we have to extract the data and save them to an individual excel report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But we are not able to get this through. i am new to this autocad or dwg stuff, i know only c#, VB .&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you specified that you have the code for extracting the data from .dwg files right . Can you help me with that whole code which helps me a lot. you can send me the code via mail specified below if you can.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please do the needful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;P&gt;ajay.potti@gmail.com&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 10:43:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/6926101#M55000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-07T10:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9208616#M55001</link>
      <description>&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Can you share the code, I want to achieve the same&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Divz&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 05:50:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9208616#M55001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-18T05:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9238359#M55002</link>
      <description>&lt;P&gt;Ya could you share the code like the guy above me said? I'm trying to learn but tend to learn better by examples, thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 17:52:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9238359#M55002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-08T17:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data Extraction Using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9260901#M55003</link>
      <description>&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;I also have same requirement , can you please help out here.&lt;/P&gt;&lt;P&gt;if you share source code sample how can I give drawing URL and read text that will be more appreciable.&lt;/P&gt;&lt;P&gt;My email is jatin.vyas@rigelnetworks.com&lt;/P&gt;&lt;P&gt;Awaiting your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jatin Vyas.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 07:05:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/data-extraction-using-net/m-p/9260901#M55003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-20T07:05:22Z</dc:date>
    </item>
  </channel>
</rss>

