On Wed, Jun 07, 2006 at 12:12:53PM +0100, James Stott wrote: > Is there a way that you can set text objects on a layout as variables, > then change the values of these variables so the text object on the > layout changes?
Take a look at MapBook (free trial version at http://www.gisnet.com/catalog/software/tools/index.php?id=14) to see an example of this. It's done by using text strings preceded by an '@' (so they can be recognized as variables as opposed to text you don't want to translate.) Then the contents of the string is the variable name and its position is replaced by the value of that variable. Font, color and style is inherited from the original text and alignment tweaks are done by noting the alignment assigned to the original text. You can take advantage of the fact that the layout layer is really a table (with no data associated with features) so as long as you know an object's ID, you can replace it with another object using the 'update ... where rowid = id' statement. For example, if you place the string @Page at the top right edge of your layout frame and set the alignment to right-justfied, then MapBook will recognize that as the variable 'Page' and will replace it with the current page number, right-justified to the right-hand edge of where the orignal text was. - Bill Thoen _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
