Getting the FieldCode String for a Table Cell

Discussion in 'AutoCAD' started by Terry W. Dotson, Apr 8, 2005.

  1. I understand that I can set the FieldCode for a Table cell by setting
    its text property to a field expression. However I want to be able to
    get this string back later for possible modification. The only thing I
    could find was GetFieldId(Row&, Col&) which returns a long. How would I
    go about getting the (apparent) Mtext object it refers to?

    Thanks in advance.

    Terry
     
    Terry W. Dotson, Apr 8, 2005
    #1
  2. Terry W. Dotson

    Joe Sutphin Guest

    Public Sub GetTextInTable()
    Dim oTable As AcadTable
    Dim Point As Variant

    ThisDrawing.Utility.GetEntity oTable, Point, "Select a table"

    With oTable
    'this displays the header row,column
    Debug.Print .GetText(0, 0)
    End With
    End Sub


    Joe
     
    Joe Sutphin, Apr 8, 2005
    #2
  3. Fully aware of .GetText, that returns the string that the user sees.
    I'm after the FieldCode, the field expression, such as:

    %<\AcExpr (297494.78935545) \f "%lu2%pr2%th44">%

    Terry
     
    Terry W. Dotson, Apr 8, 2005
    #3
  4. someString = MyTable.GetText(1, 1)

    Maybe?
     
    Paul Richardson, Apr 8, 2005
    #4
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.