<?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 Reading object data from dwg file in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501437#M2637</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how can read object data from a dwg file using c# or c++?&lt;BR /&gt;
&lt;BR /&gt;
regards,&lt;BR /&gt;
anant

Edited by: apt42 on Jun 5, 2009 3:37 PM</description>
    <pubDate>Fri, 05 Jun 2009 15:37:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-06-05T15:37:00Z</dc:date>
    <item>
      <title>Reading object data from dwg file</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501437#M2637</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how can read object data from a dwg file using c# or c++?&lt;BR /&gt;
&lt;BR /&gt;
regards,&lt;BR /&gt;
anant

Edited by: apt42 on Jun 5, 2009 3:37 PM</description>
      <pubDate>Fri, 05 Jun 2009 15:37:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501437#M2637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-05T15:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading object data from dwg file</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501438#M2638</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Look in the Map3D SDK samples there are one or two &lt;BR /&gt;
examples in there. &lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;BR /&gt;-- &lt;BR /&gt;Murph&lt;BR /&gt;&lt;A&gt;&lt;BR /&gt;
href="http://www.map3d.wordpress.com"&amp;gt;www.map3d.wordpress.com&lt;/A&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"apt42" wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:6196452@discussion.autodesk.com"&amp;gt;news:6196452@discussion.autodesk.com&lt;/A&gt;...&lt;/DIV&gt;Hi, &lt;BR /&gt;
  Does anyone know how can read object data from a dwg file using c# or c++? &lt;BR /&gt;
  regards, anant Edited by: apt42 on Jun 5, 2009 3:37 &lt;BR /&gt;
PM&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Jun 2009 19:33:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501438#M2638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-05T19:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reading object data from dwg file</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501439#M2639</link>
      <description>anant,&lt;BR /&gt;
&lt;BR /&gt;
you can find lot of samples in \Map ObjectARX SDK 2009\Map Samples\DotNet\ObjectDataCS&lt;BR /&gt;
&lt;BR /&gt;
I am giving some code which worked for me for Map3D 2007. try this.&lt;BR /&gt;
&lt;BR /&gt;
[CommandMethod("OdShow")]&lt;BR /&gt;
        public void ShowData()&lt;BR /&gt;
        {&lt;BR /&gt;
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
            PromptEntityOptions pe = new PromptEntityOptions("Select Entity..: ");&lt;BR /&gt;
            PromptEntityResult pr = ed.GetEntity(pe);&lt;BR /&gt;
            if (pr.Status == PromptStatus.OK)&lt;BR /&gt;
            {&lt;BR /&gt;
                Autodesk.AutoCAD.ApplicationServices.TransactionManager tm = Application.DocumentManager.MdiActiveDocument.TransactionManager;&lt;BR /&gt;
                Transaction tr = tm.StartTransaction();&lt;BR /&gt;
                Entity en = (Entity)tm.GetObject(pr.ObjectId, OpenMode.ForRead);&lt;BR /&gt;
&lt;BR /&gt;
                MapApplication mapApp = HostMapApplicationServices.Application;&lt;BR /&gt;
                Tables tables = mapApp.ActiveProject.ODTables;&lt;BR /&gt;
                Records recs = tables.GetObjectRecords(0, en.ObjectId, Autodesk.Gis.Map.Constants.OpenMode.OpenForRead,true);&lt;BR /&gt;
                ed.WriteMessage("\n");&lt;BR /&gt;
                foreach (Record rec in recs)&lt;BR /&gt;
                {&lt;BR /&gt;
                    Autodesk.Gis.Map.ObjectData.Table tbl = tables[rec.TableName.ToString()];&lt;BR /&gt;
                    FieldDefinitions fldDef = tbl.FieldDefinitions;&lt;BR /&gt;
                    ed.WriteMessage("\n");&lt;BR /&gt;
                    ed.WriteMessage(rec.TableName.ToString());&lt;BR /&gt;
                    ed.WriteMessage("\n");&lt;BR /&gt;
                    ed.WriteMessage("--------------------");&lt;BR /&gt;
                    ed.WriteMessage("\n");&lt;BR /&gt;
                    for (int i = 0; i &amp;lt; fldDef.Count; i++)&lt;BR /&gt;
        			{&lt;BR /&gt;
                        ed.WriteMessage(fldDef&lt;I&gt;.Name.ToString() + " : " + getValasStrig(rec&lt;I&gt;));&lt;BR /&gt;
                        ed.WriteMessage("\n");&lt;BR /&gt;
                    }&lt;BR /&gt;
                    &lt;BR /&gt;
                    ed.WriteMessage("\n");&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
Sreekar Masani.&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Thu, 09 Jul 2009 10:38:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/reading-object-data-from-dwg-file/m-p/2501439#M2639</guid>
      <dc:creator>masanisreekar</dc:creator>
      <dc:date>2009-07-09T10:38:33Z</dc:date>
    </item>
  </channel>
</rss>

