Hi Doug,

The way I do this is by making sure that the text that should be replaced
is surrounded by a special character, eg. [ ].

Now I can search the different text blocks for these characters and replace
them and their name with the decired variable:

"This is a certified copy of amendment sheet IPA [VAR1]
amending the Transitional Planning Scheme for the Shire of Livingstone
adopted at its meeting held on [VAR2]. Notice of the
amendment......
Printed by [USERID] / [DATE]"

My program now seaches this text block and finds the following texts:
[VAR1]
[VAR2]
[USERID]
[DATE]

Of course the is some build in wisdom, so that the program knows what to
replace some of the texts with:
[VAR1]    = ""
[VAR2]    = ""
[USERID]  = "PEM"
[DATE]    = "2000.02.28"

Now all the found text are presented to the user in a dialog, where they
can be changed:
[VAR1]    = "What ever"
[VAR2]    = "What ever again"
[USERID]  = "PEM"
[DATE]    = "2000.02.28"

And finally the program starts replacing the found text element in the text
block:
"This is a certified copy of amendment sheet IPA What ever
amending the Transitional Planning Scheme for the Shire of Livingstone
adopted at its meeting held on What ever again. Notice of the
amendment......
Printed by PEM / 2000.02.28"

I hope this has given you some inspiration!

Peter
------------------------------------------------------------------------------------------------
Peter Horsbøll Møller, GIS Udviklingskonsulent / GIS-Developer
Kampsax A/S - GIS Software & Solutions
Rugaardsvej 55, 5000 Odense, DK
tel: +45 6313 5013,  dir:+45 6313 5008,  fax: +45 6313 5090
mailto:[EMAIL PROTECTED]
www.kampsax-gis.dk and www.kampsax.dk
Authorized MapInfo Partner & Distributor in Denmark and Norway.
------------------------------------------------------------------------------------------------
Klik ind på http://www.kortal.dk og se det hele lidt fra oven!
----- Videresendt af Peter Møller/Kampsax - 28-02-2002 08:27 -----
                                                                                       
                                            
                    "Doug Pease"                                                       
                                            
                    <[EMAIL PROTECTED]        Til:    "MapInfo List" 
<[EMAIL PROTECTED]>                
                    au>                                  cc:                           
                                            
                    Sendt af:                            Vedr.:  MI-L MI - Variables 
in a text block                               
                    [EMAIL PROTECTED]                                      
                                            
                    onsmag.com                                                         
                                            
                                                                                       
                                            
                                                                                       
                                            
                    26-02-2002 23:55                                                   
                                            
                    Besvar venligst til "Doug                                          
                                            
                    Pease"                                                             
                                            
                                                                                       
                                            
                                                                                       
                                            



Hi all,

I am trying to work out the best way to use variables in a text block
from with a MBX application.

The text block would be as follows:

"This is a certified copy of amendment sheet IPA " + variabletext + "
amending the Transitional Planning Scheme for the  Shire of Livingstone
adopted at its meeting held on " + anothervariable + ". Notice of the
amendment......   etc etc

What would be the most efficient way to put this text into a text block
within a layout from within a MBX. I have created a dialog box which
gets the variables from the user but am unsure of how best to actually
add variables to the text and insert it into the layout.

Any suggestions gratefully accepted.


Doug Pease
GISO
Livingstone Shire Council
P.O. Box 600
YEPPOON 4703
Australia

Ph   07 49399957
Fax 07 49393290



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.





_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to