Hi James
 
I have recently written a program that utilises a layout template with frames, symbols, and text objects.  The frames and text objects are all variables.  Each with standard style attributes set in the layout.  The following code is one way in which you can select the text object variable and update it with your newly created variable.
 
UPDATE THE @DATE VARIABLE
 - strLayWinName is the variable set for the Layout
 - val(str$(objectinfo(object,1))) = 10 is the ObjectInfo TYPE for TEXT objects
 - str$(objectinfo(object,3)) = "@DATE" is the ObjectInfo TEXTSTRING for your variable in the layout "@DATE"
 - the selected text object "@DATE" is then stored as a layout object variable and then ALTERED with the new variable FormatDate$(CurDate()) then UPDATED
 
'========================================================================

 select * from strLayWinName where val(str$(objectinfo(object,1))) = 10 into strLaySel noselect
 select * from strLaySel where str$(objectinfo(object,3)) = "@DATE" into strLayObjSel
 
 oLayout = strLayObjSel.object
 alter object oLayout info 3, FormatDate$(CurDate()) 
 update selection set object = oLayout
 
'========================================================================
 
Good luck.
 
Cheers
Ethan
 

Ethan Hohneck
Systems Analyst
Digital Mapping Solutions
Level 2,
2 Hardy Street
South Perth WA 6151
Ph 08 9474 6311
Fax 08 9474 6411
www.mapsolutions.com.au
 | MapInfo Training | IntraMaps | InterMaps | MobileMap | News

Disclaimer

This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed.  Although every effort has been made to ensure the correctness and integrity of attachments that may be included in this email, this can only apply to the unaltered/uncorrupted form. A copy of the original attachment is available from our office should you require it.  Alternately, if further verification is required please request a hard copy version.

Digital Mapping Solutions

 
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to