Results 1 to 3 of 3

Thread: Accessing OD Tables in AutoCad Standard using VBA Com?

  1. #1
    Member
    Join Date
    2017-07
    Posts
    4
    Login to Give a bone
    0

    Default Accessing OD Tables in AutoCad Standard using VBA Com?

    Hi,

    I tried checking from google to access OD table in AutoCad Standard but failed to find?

    Is it possible to Access the OD Tables in AutoCad Standard using VBA Com, Lisp or .Net?

    Need your advice.

    Thanks and regards,

    Alex

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,397
    Login to Give a bone
    0

    Default Re: Accessing OD Tables in AutoCad Standard using VBA Com?

    No, you need to have Map 3D installed to work with Object Data.
    C:> ED WORKING....

  3. #3
    Member
    Join Date
    2017-07
    Posts
    4
    Login to Give a bone
    0

    Default Re: Accessing OD Tables in AutoCad Standard using VBA Com?

    AutoCad Map is now running. I tried to run the sample given but it crashes when I tried to retrieve the data.

    I'm using AutoCad Map 3D 2016 (SP2) and VBA Enabler.

    Sample code below:
    Dim theMap As AcadMap
    Dim theODTableName As String
    Dim theODTable As odTable
    Dim theODRecs As ODRecords
    Dim theODRec As odRecord
    Dim theObj As Object
    Dim theBool As Boolean


    'check to see if Object Data Table exists
    theODTableName = "SERVICECORRIDOR"
    Set theMap = ThisDrawing.Application.GetInterfaceObject("AutoCADMap.Application")
    MsgBox theMap.Projects(ThisDrawing).ODTables.count
    Set theODTable = theMap.Projects(ThisDrawing).ODTables.Item(theODTableName) '<- It crashes in this area
    If theODTable Is Nothing Then
    MsgBox "Object Data Table does not exist."
    Exit Sub
    End If

Similar Threads

  1. Accessing AutoCAD with Excel through VBA
    By raymeek in forum VBA/COM Interop
    Replies: 7
    Last Post: 2008-02-27, 11:31 PM
  2. Replies: 5
    Last Post: 2007-05-08, 08:39 AM
  3. Accessing the annotation scale list in AutoCAD 2008
    By cgerhardt in forum VBA/COM Interop
    Replies: 0
    Last Post: 2007-04-24, 08:28 PM
  4. Accessing AutoCAD from Excel (or other App)
    By Robert Platt in forum VBA/COM Interop
    Replies: 4
    Last Post: 2007-04-08, 05:11 AM
  5. Accessing ACIS data in Autocad
    By nsuhas in forum Software
    Replies: 2
    Last Post: 2004-10-12, 07:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •