Table Export code: Request assistance.

Discussion in 'AutoCAD' started by Dan, Jul 28, 2004.

  1. Dan

    Dan Guest

    Hello, I have learned a lot from this group, and wanted to say thank you to
    everyone here.

    I am currently trying to write a code that will do the following:

    Public Sub TableExportMacro()
    'get drawing path & name
    Dim thisdwgpath As String
    thisdwgpath = ThisDrawing.GetVariable("dwgprefix")
    Dim thisdwgname As String
    thisdwgname = ThisDrawing.GetVariable("dwgname")
    'change to modelspace
    ThisDrawing.ActiveSpace = acModelSpace
    'tableexport table @ -100,500
    (not sure about this part, I want to run the TableExport command, select a
    table @ -100,500, then save the CSV file with the dwgpath & dwgname in a
    subfolder "..\data")

    Anyhelp is appreciated, thanks!
     
    Dan, Jul 28, 2004
    #1
  2. Hi,

    The will be a "Collection of Tables" Object in the Drawing Object Model.
    Search for tables in the tables collection till you find one with the
    insertion point matching your requirement.

    For Each Table in TablesCollection
    If Abs(Table.InsertionPoint(0) - 100) < 0.1 and
    Abs(Table.InsertionPoint(1) - 500) < 0.1
    then export
    end if
    next

    I just typed this by guesswork. treat it as pseudo code.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au
     
    Laurie Comerford, Jul 28, 2004
    #2
  3. Dan

    Dan Guest

    Thanks for the lead. I am really new to VBA....I am not sure what to do with
    it.

    Looks like a different direction i was going by not using the "tableexport"
    command.

    I am open for any approach that works....Does anyone know how to find what
    tableexport is used in vba terms.
     
    Dan, Jul 29, 2004
    #3
  4. Dan

    Dan Guest

    Has anyone used "tableexport" command before? I cant seem to fin any
    documents or switches on it, and filedia/0 does not remove the dialog box
    either.

    Thanks for any help.
     
    Dan, Jul 29, 2004
    #4
  5. Dan

    Dan Guest

    15min has taken me a lot longer to figure out, any help is appreciated.
     
    Dan, Jul 30, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.