Tony,

It seems to me there is nothing wrong in your Alter Object statement.

Creating text into variable is little trickier though, because you have to
calculate the coordinates of bounding rectagle of your desired text object.
But since you are altering the existing object all you have to do is

Select * From <yourtable> Where RowID = <you_fetched_rowid> Into tmp
myobj = tmp.obj
Alter Object myobj Info OBJ_INFO_TEXTSTRING, "New Text"
Update tmp set obj = myobj

Regards,
    Anssi

-----Original Message-----
From: Tony Elson <[EMAIL PROTECTED]>
To: Mapinfo User Group <[EMAIL PROTECTED]>
Date: 22. hein�kuuta 1999 9:17
Subject: MI Altering Objects in Layouts (Text Objects)


>Apologise in advance if this has been covered before and I'll admitt
>that my experience in MapBasic is limited.
>
>Basically, I have a layout.  I want to automatically update some text in
>the layout.
>
>I have been able to identify the text I wish to change via the "fetch"
>and "objectinfo()" commands in my
>very basic .mbx program.
>
>However, I am having major difficulty trying to use the "Alter Object"
>statement.
>
>Since (or as I understand it) that the Alter Object statement requires
>an object variable (therefore referenceing and object or more
>specifically in my case, a text object), I have tried using the create
>text into variable command (even though the text is already there)
>
>So, my program looks a little like this:
>
>......create text into variable myobj txt_var ..... etc 'where txt_var
>is a variable of the existing text.
>
>then I go:
>
>Alter Object myobj info OBJ_INFO_TEXTSTRING, "New Text".
>
>
>Obviously, I have something fundamentally wrong somewhere and I am not
>convince that the create text into variable command is the correct way
>to go.
>
>Are there other options?
>
>Thanks in advance
>
>-----------------------------------
>Tony Elson
>
>GIS Analyst
>
>Geographic Technologies Limited
>PO Box 6015
>Wellesley Street,
>Auckland, New Zealand
>
>Ph: 64 9 379 2061 x107
>Fax: 64 9 379 2044
>Mobile: 025 278 4896
>Email: [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>------------------------------------
>----------------------------------------------------------------------
>To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
>"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to