Jacques,
 
   I also tried to do this, but is not possible to
use a variable (Brush_Styles) in a string in order to
use "Run Command" and modify the variable. Are you
really tried to use your code ?
 
comm=" Create Styles From   " +MIBrushLOW + "To "+MIBrushHIGH
       +"Vary   Color By ''"RGB''"  Number 10 Into   Variable Brush_Styles"
run command comm
 
   Yas,
 
   Yes, Brush_Styles is declared as array of brush,
but this does not work.
 
   Finally, I make a procedure to do this. The
procedure
 
   Declare Sub Calculate_Colors (
                                  Top               as Brush, 
                                  Middle           as Brush,
                                  Down             as Brush,
                                  Brushes()       as Brush,
                                  Inflection       as Integer)
 
   returns a array of brush like "Create Styles ...".
I think is the only way to do this. Would you like
the '.mbo' module ?
 
   Thank you very much, Jacques and Yas.
 
PS : J'aime beaucoup votre site web, Jacques.
 
Carlos Montalvillo G�mez
SGSMap - Ingenieros Consultores
Camino de Portuetxe, 83
20018 - San Sebastian - Espa�a
Tel (+34) 943 31 74 90
http://www.sgsmap.com/
mailto:[EMAIL PROTECTED]
 
 
----- Original Message -----
Sent: Wednesday, June 14, 2000 2:09 PM
Subject: RE: MI Create Styles

Carlos,
 
Use the run command solution; it allows for passing variables. In your case
 
dim comm as string
 
comm=" Create Styles From   " +MIBrushLOW + "To "+MIBrushHIGH
       +"Vary   Color By ''"RGB''"  Number 10 Into   Variable Brush_Styles"
run command comm
 
Make sure of the required number of " when passing a ", I always forget it it "" or """. Sorry about that
You may also to check if Brush_styles is properly handled, It may have also to be passed as a variable.

Jacques Paris     [EMAIL PROTECTED]  

Paris PC Consult (mainly MapInfo app.)
     www.total.net/~rparis/gisproducts.htm

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Carlos Montalvillo
Sent: June 14, 2000 6:14 AM
To: [EMAIL PROTECTED]
Subject: MI Create Styles


   Hello,

   I was wondering if anyone had any ideas on this one.  

   I would like to create styles defining the color ranges from a variable.

   For example :

       Dim MIBrushLOW, MIBrushHIGH as Brush

       (...)

       Create Styles
       From   MIBrushLOW
       To     MIBrushHIGH
       Vary   Color By "RGB"
       Number 10
       Into   Variable Brush_Styles 

   But MapBasic stands a constant value for FROM and TO. How can I solve it ?

   Thanks, any ideas would be greatly appreciated.

Carlos Montalvillo G�mez
SGSMap - Ingenieros Consultores
Camino de Portuetxe, 83
20018 - San Sebastian - Espa�a
Tel (+34) 943 31 74 90
http://www.sgsmap.com/
mailto:[EMAIL PROTECTED]


----- Original Message -----

Is your Brush_Styles declared as array of brush?
 
    Dim Brush_Styles(0)        As Brush
 
      MIBrushLOW= makebrush(2,  Black,  0)
      MIBrushHIGH= makebrush(2White0)
 
      Create Styles
        From brush MIBrushLOW
        To brush MIBrushHIGH
        Vary Color by "RGB"
        Number 10
        Into Variable Brush_Styles

Yas
Software Engineer
voice: (918) 877.6704 or (800) 727.6774
fax:   (918) 877.6960
web:   http://www.mpsisys.com
email: [EMAIL PROTECTED]

Reply via email to