<?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: in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328814#M42054</link>
    <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;As to the book, i think most of us here would &lt;BR /&gt;
recommend that you get started with "Programming AutoCAD 2000 Using ObjectARX" &lt;BR /&gt;
by Charles McAuley.&amp;nbsp; If you're not already a C++ programmer, however, you &lt;BR /&gt;
may want to start by going through the basics with any Visual C++ beginners &lt;BR /&gt;
book.&amp;nbsp; You can certainly jump right in and start with ARX, but it helps to &lt;BR /&gt;
have some basic knowledge of how C++ works.&amp;nbsp; Two years ago when i first &lt;BR /&gt;
looked at ARX i had very little C++ knowledge (though i had programmed quite a &lt;BR /&gt;
bit in VB), and i struggled to get ANYTHING to work right.&amp;nbsp; After a few &lt;BR /&gt;
beginners C++ books, though, everything seemed to make a lot more sense...&amp;nbsp; &lt;BR /&gt;
Good luck.&lt;/FONT&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 06 Mar 2002 17:42:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-03-06T17:42:47Z</dc:date>
    <item>
      <title>Retriving data from Drawing</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328810#M42050</link>
      <description>Hello I am a newbie on AutoCAD customization and I have no idea how to solving this problem: we have pdf file and there is a drawing number. After draft other people review it and put tag on the drawing. To do so reviewer manually types drawing number into tag. Is there any way you can retrieve these data without opening the drawing?&lt;BR /&gt;
&lt;BR /&gt;
Paul</description>
      <pubDate>Mon, 04 Mar 2002 09:10:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328810#M42050</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-04T09:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retriving data from Drawing</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328811#M42051</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Can you be more specific as to what the process is &lt;BR /&gt;
that is being used?&amp;nbsp; What do you mean by a "tag"?&amp;nbsp; And how is it being &lt;BR /&gt;
put "on" the drawing?&amp;nbsp; If the "tag" is being put into the drawing database, &lt;BR /&gt;
then you will have to access the drawing itself.&amp;nbsp; However, this may be &lt;BR /&gt;
transparent to the user.&amp;nbsp; For example, using ARX you can call the &lt;BR /&gt;
readDwgFile( ) command to pull in the drawing database without actually opening &lt;BR /&gt;
the drawing in the editor.&amp;nbsp; Is that what you're asking?&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE dir="ltr"&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;"pechoi181" &amp;lt;&lt;A href="mailto:exc181@psu.edu"&gt;exc181@psu.edu&lt;/A&gt;&amp;gt; &lt;BR /&gt;
  wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:f0c059e.-1@WebX.maYIadrTaRb"&amp;gt;news:f0c059e.-1@WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;Hello &lt;BR /&gt;
  I am a newbie on AutoCAD customization and I have no idea how to solving this &lt;BR /&gt;
  problem: we have pdf file and there is a drawing number. After draft other &lt;BR /&gt;
  people review it and put tag on the drawing. To do so reviewer manually types &lt;BR /&gt;
  drawing number into tag. Is there any way you can retrieve these data without &lt;BR /&gt;
  opening the drawing? &lt;BR /&gt;
  &lt;P&gt;Paul&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 04 Mar 2002 11:05:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328811#M42051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-04T11:05:17Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328812#M42052</link>
      <description>yes that's exactly what I am looking for you think you can give me more detail on that? And also could you recommend me some ARX reference book if you know any.&lt;BR /&gt;
Thank you&lt;BR /&gt;
Paul</description>
      <pubDate>Tue, 05 Mar 2002 04:50:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328812#M42052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-05T04:50:38Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328813#M42053</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;The readDwgFile is actually pretty simple to &lt;BR /&gt;
use.&amp;nbsp; First you create a new AcDbDatabase, sending it an Adesk::kFalse to &lt;BR /&gt;
ensure that the new DB is completely empty (since we're going to be reading a DB &lt;BR /&gt;
in with the next command).&amp;nbsp; Next we call the readDwgFile with the path to &lt;BR /&gt;
the file we wish to examine.&amp;nbsp; Once we've read in the file, we can now do &lt;BR /&gt;
whatever we like to the DWG.&amp;nbsp; For example, perhaps we want to count the &lt;BR /&gt;
number of circles in the drawing:&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;(i haven't actually tested this code, so don't &lt;BR /&gt;
assume it's going to compile and run flawlessly!&amp;nbsp; Most of the code came &lt;BR /&gt;
from one of my apps though, so most of it should be fine)&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// Create a new AcDbDatabase pointer, and point it &lt;BR /&gt;
at a completely empty DB&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;AcDbDatabase *pDb = new &lt;BR /&gt;
AcDbDatabase(Adesk::kFalse);&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// Read in the DWG file you wish to &lt;BR /&gt;
manipulate&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;pDb-&amp;gt;readDwgFile(fileName);&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// Get the block table of our new DB&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;AcDbBlockTable *pBlockTable;&lt;BR /&gt;es = &lt;BR /&gt;
pDb-&amp;gt;getBlockTable(pBlockTable, AcDb::kForRead);&lt;BR /&gt;if(es != &lt;BR /&gt;
Acad::eOk)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CString a;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
a.Format("Failed to get block table %d", es);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
AfxMessageBox(a);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;// Now retrive &lt;BR /&gt;
the block table record that corresponds to model space.&lt;BR /&gt;AcDbBlockTableRecord &lt;BR /&gt;
*pBlockTableRecord;&lt;BR /&gt;es = &lt;BR /&gt;
pBlockTable-&amp;gt;getAt(ACDB_MODEL_SPACE,pBlockTableRecord, &lt;BR /&gt;
AcDb::kForWrite);&lt;BR /&gt;if(es != Acad::eOk)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CString &lt;BR /&gt;
a;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.Format("Failed to get block table record : %d", &lt;BR /&gt;
es);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AfxMessageBox(a);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
pBlockTable-&amp;gt;close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;// We &lt;BR /&gt;
have model space, so close the main &lt;BR /&gt;
table.&lt;BR /&gt;pBlockTable-&amp;gt;close();&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// Create an iterator to step through the &lt;BR /&gt;
entities&lt;BR /&gt;// contained in model space.&lt;BR /&gt;AcDbBlockTableRecordIterator &lt;BR /&gt;
*pBlockIterator;&lt;BR /&gt;es = &lt;BR /&gt;
pBlockTableRecord-&amp;gt;newIterator(pBlockIterator);&lt;BR /&gt;if(es != &lt;BR /&gt;
Acad::eOk)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CString a;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
a.Format("%d",es);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
pBlockTable-&amp;gt;close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
pBlockTableRecord-&amp;gt;close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AfxMessageBox("Failed to &lt;BR /&gt;
create a new iterator: " + a);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// Integer variable to store the number of &lt;BR /&gt;
circles.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;int circleCount;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// We now have a valid iterator.&amp;nbsp; Step through &lt;BR /&gt;
all of the&amp;nbsp;entities and&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// count the circles.&amp;nbsp;&lt;BR /&gt;for (; &lt;BR /&gt;
!pBlockIterator-&amp;gt;done(); pBlockIterator-&amp;gt;step())&lt;BR /&gt;{&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a NULL entity pointer &lt;BR /&gt;
to be used in the next&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// statement.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AcDbEntity *pEntity = &lt;BR /&gt;
NULL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Open the entity pointed &lt;BR /&gt;
to by the &lt;BR /&gt;
iterator&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pBlockIterator-&amp;gt;getEntity(pEntity, &lt;BR /&gt;
AcDb::kForRead);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Now check to see if the &lt;BR /&gt;
entity is a circle&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(pEntity-&amp;gt;isKindOf(AcDbCirlce))&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
circleCount++;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// We're done iterating.&amp;nbsp; Delete the iterator &lt;BR /&gt;
and close the block table record&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;delete &lt;BR /&gt;
pBlockIterator;&lt;BR /&gt;pBlockTableRecord-&amp;gt;close();&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;// Now do something with the &lt;BR /&gt;
circleCount...&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Mar 2002 17:30:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328813#M42053</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-06T17:30:35Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328814#M42054</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;As to the book, i think most of us here would &lt;BR /&gt;
recommend that you get started with "Programming AutoCAD 2000 Using ObjectARX" &lt;BR /&gt;
by Charles McAuley.&amp;nbsp; If you're not already a C++ programmer, however, you &lt;BR /&gt;
may want to start by going through the basics with any Visual C++ beginners &lt;BR /&gt;
book.&amp;nbsp; You can certainly jump right in and start with ARX, but it helps to &lt;BR /&gt;
have some basic knowledge of how C++ works.&amp;nbsp; Two years ago when i first &lt;BR /&gt;
looked at ARX i had very little C++ knowledge (though i had programmed quite a &lt;BR /&gt;
bit in VB), and i struggled to get ANYTHING to work right.&amp;nbsp; After a few &lt;BR /&gt;
beginners C++ books, though, everything seemed to make a lot more sense...&amp;nbsp; &lt;BR /&gt;
Good luck.&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Mar 2002 17:42:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/retriving-data-from-drawing/m-p/328814#M42054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-06T17:42:47Z</dc:date>
    </item>
  </channel>
</rss>

