Getting the FieldCode String for a Table Cell
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Getting the FieldCode String for a Table Cell

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Terry W. Dotson
Guest





Posted: Fri Apr 08, 2005 11:12 pm    Post subject: Getting the FieldCode String for a Table Cell Reply with quote

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

Back to top
Joe Sutphin
Guest





Posted: Sat Apr 09, 2005 12:31 am    Post subject: Re: Getting the FieldCode String for a Table Cell Reply with quote

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
--

"Terry W. Dotson" <nospam@invalid.com> wrote in message
news:4256d78c$1_1@newsprd01...
Quote:
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
Back to top
Terry W. Dotson
Guest





Posted: Sat Apr 09, 2005 1:55 am    Post subject: Re: Getting the FieldCode String for a Table Cell Reply with quote

Joe Sutphin wrote:

Quote:
Debug.Print .GetText(0, 0)

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

Back to top
Paul Richardson
Guest





Posted: Sat Apr 09, 2005 2:44 am    Post subject: Re: Getting the FieldCode String for a Table Cell Reply with quote

someString = MyTable.GetText(1, 1)

Maybe?

"Terry W. Dotson" <nospam@invalid.com> wrote in message
news:4256d78c$1_1@newsprd01...
Quote:
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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB