Sub main 'Creates an instance of the MapViewer Application object 'and assigns it to the variable named "mvApp" Set mvApp = CreateObject("MapViewer.Application") 'Makes the application main window visible mvApp.Visible = True 'Assigns the location of the samples folder to the variable "InPath" InPath$ = mvApp.ApplicationFolder + "samples\" 'Creates a map document object, and assigns it to the variable named "Plot" Set Plot = mvApp.Documents.Add(DocType:=mvDocPlot) 'Creates a line graph map object and assigns it to the variable named "LineGraphMap" Set LineGraphMap = Plot.CreateLineGraphMap(InPath$ + "co2000.gsb", InPath$ + "co2000.dat", "", _ "SecondaryIDField=2, Attribute1Field=1", 1, 5) ''''''''''''''''''''''' 'Sets the baseline for a line graph map LineGraphMap.AddBaseLine = True 'Sets the state of the break line for a line graph map LineGraphMap.AddBreakLine = True 'Sets a graph's base height to 0.5 LineGraphMap.BaseHeight=0.05 'Sets the properties for the baseline LineGraphMap.Baseline.Color = mvColorOrange LineGraphMap.Baseline.Width = 0.05 LineGraphMap.Baseline.Style = "Dash Dot" 'Sets the properties for the break line LineGraphMap.BreakLine.Color = mvColorNeonRed LineGraphMap.BreakLine.Width = 0.02 LineGraphMap.BreakLine.Style = "Dash Dot Dot" 'Sets the data break value for a line graph map to 40000 LineGraphMap.BreakValue=40000 'Sets the state of descending order graphing LineGraphMap.DescendingOrder=True 'Sets the state of using global data from the worksheet LineGraphMap.GlobalData = True 'Sets the fill properties for the line graph LineGraphMap.GraphFill.ForeColor = mvColorBlue LineGraphMap.GraphFill.BackColor = mvColorGreen LineGraphMap.GraphFill.Pattern="Forward Slash" LineGraphMap.GraphFill.Transparent = True 'Sets the graph height to 0.75 LineGraphMap.GraphHeight=0.75 'Sets the graph line properties LineGraphMap.GraphLine.Color=mvColorPurple LineGraphMap.GraphLine.Width = 0.01 'Sets the graph position centroid offset type to User Defined LineGraphMap.GraphPosOffsetType=mvPosOffsetUser 'Sets the graph position X offset. LineGraphMap.GraphPosXOffset=0.05 'Sets the Graph position Y offset. LineGraphMap.GraphPosYOffset=-0.5 'Sets the state of horizontal graph LineGraphMap.HorizontalGraph=True 'Sets the PID column of the worksheet. 'LineGraphMap.PIDCol=4 'Sets the Profile fill properties LineGraphMap.ProfileFill.ForeColor=mvColorForestGreen LineGraphMap.ProfileFill.BackColor=mvColorBabyBlue LineGraphMap.ProfileFill.Pattern="Gravel" 'Sets the Profile line properties LineGraphMap.ProfileLine.Color = mvColorBlue LineGraphMap.ProfileLine.Width = 0.02 'Returns the state of the User Limits checkbox Debug.Print LineGraphMap.UserLimits 'Returns the User Limits max value Debug.Print LineGraphMap.UserLimitMaxVal 'Returns the User Limits min value Debug.Print LineGraphMap.UserLimitMinVal 'Sets the variable coloumn of the worksheet to Column H LineGraphMap.VarCol= 8 'Sets the width of the line graph map LineGraphMap.Width = 0.65 'Set the User Limits state and specify the Min/Max values LineGraphMap.SetUserLimits(True,50,35000) 'Creates a legend for the map Set Legend = LineGraphMap.CreateLegend(-2,6) 'Adds the LineGraphMap information in Layer #1 to legend LineGraphMap.AddLayerToLegend("Layer #1") End Sub