MeteoInfo Script

MeteoInfo could be run and output maps automatically using script application ¡®MIScript.exe¡¯ which could be found in MeteoInfo installation folder. The script language is IronPython (http://ironpython.codeplex.com/).

There are some demo scripts in the ¡®Script¡¯ folder of the software.

The script should be run in command window as following.

 

 

The script content of the above example is following.

 

import clr

clr.AddReferenceByPartialName("System.Windows.Forms")

clr.AddReferenceByPartialName("System.Drawing")

from System.Windows.Forms import *

from System.Drawing import *

clr.AddReference("MeteoInfoC.dll")

from MeteoInfoC import *

 

myApp = MIApp()

myApp.OpenLayer(".\\Map\\country1.shp")

myApp.SetLegendBreak("country1.shp",0,Color.Yellow,Color.Blue,1,True,False,True)

myApp.OpenGrADSData(".\\Sample\\model.ctl")

myApp.SetDrawType("shaded")

t = 2

myApp.TimeIndex = t

myApp.Display("PS")

myApp.MoveLayerToTop("country1.shp")

myApp.SetTitle("MeteoInfo script demo")

myApp.ProjectLayers("+proj=moll+lon_0=105")

myApp.MapLayout.Refresh()

#myApp.SaveFigure(".\\try.png")

Application.Run(myApp)


Copyright 2009-2011 Yaqiang Wang. All rights reserved.