AutoCAD 2005 Table VB customisation

Discussion in 'AutoCAD' started by mike.hall, Feb 19, 2004.

  1. mike.hall

    mike.hall Guest

    Hi,

    Looking to add a table in VBA.

    Dim aTable as ACAD_TABLE
    aTable.colums = 5
    etc. etc.

    but... thisdrawimg.modelspace. ??? no AddTable definition, or if there is one no direction on how to use it.

    Has anyone looked at this ?
     
    mike.hall, Feb 19, 2004
    #1
  2. Give this a try...
    You may also get more help in the VBA group...

    Sub Table()
    Dim objTable As AcadTable
    Dim insPoint(2) As Double
    Set objTable = ThisDrawing.ModelSpace.AddTable(insPoint, 5, 5, 10, 30)
    ZoomExtents
    End Sub

    Joel Roderick
    Marshall Erdman & Associates



    one no direction on how to use it.
     
    Joel Roderick, Feb 19, 2004
    #2
  3. Mike,

    In addition to any replies you might receive or already
    received, you may find more information or responses
    by posting future VBA related questions in the following
    discussion group:

    By NNTP discussion group reader at
    news://discussion.autodesk.com/autodesk.autocad.customization.vba

    By HTTP (web-based) interface at
    http://discussion.autodesk.com/forum.jspa?forumID=33
     
    Jason Piercey, Feb 19, 2004
    #3
  4. Looking to add a table in VBA.
    one no direction on how to use it.

    Mike,

    I looked at the type library in Delphi, and saw an AcadModelspace and an
    AcadModelspace2. In the AcadModelspace2 interface is the "AddTable" method.
    I haven't tested this, but could you try using a local reference to the
    modelspace object and typecasting to AcadModelspace2? Maybe something like
    this...

    Dim CurrentSpace as AcadModelspace2
    Dim aTable as AcadTable

    Set CurrentSpace = thisdrawing.Modelspace as AcadModelSpace2
    Set aTable = CurrentSpace.AddTable(InsertionPoint, RowCount, ColumnCount,
    RowHeight, ColumnWidth)

    ( please forgive my butchery of VBA, I mostly work with Lisp and Delphi )

    Hope this points you in the right direction.

    -Rick Francken
     
    Rick Francken, Feb 19, 2004
    #4
  5. mike.hall

    SpeedCAD Guest

    Hi...

    I don't know the AddTable method because I don't have AutoCAD 2005. But I did a AddTabla method for AutoCAD 2002 or 2004. I must finish it.

    Which are the parameters of the method AddTabla of AutoCAD 2005 and what table type make?

    You can show me a image please?

    Thank you

    Un saludo de SpeedCAD... :)
    CHILE
    FORO: http://www.hispacad.com/foro
     
    SpeedCAD, Feb 19, 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.