<?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 OD Sample in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568396#M3439</link>
    <description>Does this Help Sample work for anyone?&lt;BR /&gt;
&lt;BR /&gt;
----------------------------&lt;BR /&gt;
Dim amap As AcadMap&lt;BR /&gt;
Dim acadObj As Object&lt;BR /&gt;
Dim ODtb As ODTable&lt;BR /&gt;
Dim i As Integer&lt;BR /&gt;
Dim prj As Project&lt;BR /&gt;
Dim ODrcs As ODRecords&lt;BR /&gt;
Dim boolVal As Boolean&lt;BR /&gt;
&lt;BR /&gt;
Set amap = ThisDrawing.Application. _&lt;BR /&gt;
GetInterfaceObject("AutoCADMap.Application") &lt;BR /&gt;
Set prj = amap.Projects(ThisDrawing)&lt;BR /&gt;
prj.ProjectOptions.DontAddObjectsToSaveSet = True&lt;BR /&gt;
Set ODtb = prj.ODTables.Item("SampleOD")&lt;BR /&gt;
Set ODrcs = ODtb.GetODRecords&lt;BR /&gt;
For Each acadObj In ThisDrawing.ModelSpace&lt;BR /&gt;
boolVal = ODrcs.Init(acadObj, True, False) &lt;BR /&gt;
Debug.Print ODrcs.Record.tableName &lt;BR /&gt;
Debug.Print ODrcs.Record.ObjectID &lt;BR /&gt;
For i = 0 To ODrcs.Record.Count - 1 &lt;BR /&gt;
Debug.Print ODrcs.Record.Item(i).Value &lt;BR /&gt;
Next i &lt;BR /&gt;
Next&lt;BR /&gt;
------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
Thank you,&lt;BR /&gt;
Rick</description>
    <pubDate>Tue, 28 Feb 2006 19:37:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-02-28T19:37:06Z</dc:date>
    <item>
      <title>OD Sample</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568396#M3439</link>
      <description>Does this Help Sample work for anyone?&lt;BR /&gt;
&lt;BR /&gt;
----------------------------&lt;BR /&gt;
Dim amap As AcadMap&lt;BR /&gt;
Dim acadObj As Object&lt;BR /&gt;
Dim ODtb As ODTable&lt;BR /&gt;
Dim i As Integer&lt;BR /&gt;
Dim prj As Project&lt;BR /&gt;
Dim ODrcs As ODRecords&lt;BR /&gt;
Dim boolVal As Boolean&lt;BR /&gt;
&lt;BR /&gt;
Set amap = ThisDrawing.Application. _&lt;BR /&gt;
GetInterfaceObject("AutoCADMap.Application") &lt;BR /&gt;
Set prj = amap.Projects(ThisDrawing)&lt;BR /&gt;
prj.ProjectOptions.DontAddObjectsToSaveSet = True&lt;BR /&gt;
Set ODtb = prj.ODTables.Item("SampleOD")&lt;BR /&gt;
Set ODrcs = ODtb.GetODRecords&lt;BR /&gt;
For Each acadObj In ThisDrawing.ModelSpace&lt;BR /&gt;
boolVal = ODrcs.Init(acadObj, True, False) &lt;BR /&gt;
Debug.Print ODrcs.Record.tableName &lt;BR /&gt;
Debug.Print ODrcs.Record.ObjectID &lt;BR /&gt;
For i = 0 To ODrcs.Record.Count - 1 &lt;BR /&gt;
Debug.Print ODrcs.Record.Item(i).Value &lt;BR /&gt;
Next i &lt;BR /&gt;
Next&lt;BR /&gt;
------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
Thank you,&lt;BR /&gt;
Rick</description>
      <pubDate>Tue, 28 Feb 2006 19:37:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568396#M3439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-02-28T19:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: OD Sample</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568397#M3440</link>
      <description>Hello Rick,&lt;BR /&gt;
&lt;BR /&gt;
This snippet will work, if you have the SampleOD table created, and every &lt;BR /&gt;
object in ModelSpace has the Object Data attached.&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps&lt;BR /&gt;
Warren M&lt;BR /&gt;
&lt;BR /&gt;
On Tue, 28 Feb 2006 19:37:06 +0000, user0 wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Does this Help Sample work for anyone?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; ----------------------------&lt;BR /&gt;
&amp;gt; Dim amap As AcadMap&lt;BR /&gt;
&amp;gt; Dim acadObj As Object&lt;BR /&gt;
&amp;gt; Dim ODtb As ODTable&lt;BR /&gt;
&amp;gt; Dim i As Integer&lt;BR /&gt;
&amp;gt; Dim prj As Project&lt;BR /&gt;
&amp;gt; Dim ODrcs As ODRecords&lt;BR /&gt;
&amp;gt; Dim boolVal As Boolean&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Set amap = ThisDrawing.Application. _&lt;BR /&gt;
&amp;gt; GetInterfaceObject("AutoCADMap.Application") &lt;BR /&gt;
&amp;gt; Set prj = amap.Projects(ThisDrawing)&lt;BR /&gt;
&amp;gt; prj.ProjectOptions.DontAddObjectsToSaveSet = True&lt;BR /&gt;
&amp;gt; Set ODtb = prj.ODTables.Item("SampleOD")&lt;BR /&gt;
&amp;gt; Set ODrcs = ODtb.GetODRecords&lt;BR /&gt;
&amp;gt; For Each acadObj In ThisDrawing.ModelSpace&lt;BR /&gt;
&amp;gt; boolVal = ODrcs.Init(acadObj, True, False) &lt;BR /&gt;
&amp;gt; Debug.Print ODrcs.Record.tableName &lt;BR /&gt;
&amp;gt; Debug.Print ODrcs.Record.ObjectID &lt;BR /&gt;
&amp;gt; For i = 0 To ODrcs.Record.Count - 1 &lt;BR /&gt;
&amp;gt; Debug.Print ODrcs.Record.Item(i).Value &lt;BR /&gt;
&amp;gt; Next i &lt;BR /&gt;
&amp;gt; Next&lt;BR /&gt;
&amp;gt; ------------------------------------&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thank you,&lt;BR /&gt;
&amp;gt; Rick</description>
      <pubDate>Fri, 03 Mar 2006 14:48:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568397#M3440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-03-03T14:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: OD Sample</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568398#M3441</link>
      <description>Thanks for the reply Warren.  I actually had another table and I did take that into account.  My problem was an incompatible field type in the table.  Type SHORT.  Which I got from an SDE import.  I've fixed that on the GIS side and all is fine now (well almost all).&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Rick</description>
      <pubDate>Fri, 03 Mar 2006 19:42:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/od-sample/m-p/1568398#M3441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-03-03T19:42:09Z</dc:date>
    </item>
  </channel>
</rss>

