Sub Main 'Declare the variable that will reference the application Dim mvapp As Object 'Creates an instance of the MapViewer Application object ' and assigns it to the variable named "mvapp" Set mvapp = CreateObject("MapViewer.Application") 'Make MapViewer visible mvapp.Visible = True 'Declare Plot as Object Dim Plot As Object 'Creates a new plot window Set Plot = mvapp.Documents.Add(mvDocPlot) 'Declare FlowMap as object Dim FlowMap As Object 'Create a flow map using connect centroid method Set FlowMap = Plot.CreateFlowMap(BoundaryFileName:="c:\golden\mapviewer5\Samples\us50alb.gsb", _ DataFileName:="c:\golden\mapviewer5\Samples\flow.dat", FlowMethod:=mvFlowConnectEnds, _ PIDCol:=1, EPIDCol:=2, VarCol:=3 ) 'Returns the arrow scale Debug.Print "The arrow scale size is ";FlowMap.arrowScale 'Change the arrow scale FlowMap.arrowScale = 3 'Returns the bulge value Debug.Print "The bulge value for the curve is"; FlowMap.Bulge 'Change the bulge value FlowMap.Bulge = 0.6 'Return the arrow style for the line Debug.Print "The ending arrow head is ";FlowMap.EndArrow Debug.Print " 1 = No arrow, 2 = Simple, 3 = Filled, 4 = Triangle, 5 = 2 Stick" 'Change the end arrow style FlowMap.EndArrow = mvASTriangle 'Return the end offset value Debug.Print "The end offset for the flow lines is ";FlowMap.EndOffset 'Change the end offset value FlowMap.EndOffset = 0.05 'Return the column used for the PID Debug.Print "The PID column for the end of the line is column ";FlowMap.EndPIDCol 'Change the column used for the end of line PID FlowMap.EndPIDCol = 2 'Return the method used To create the flow lines Debug.Print "The method used to create the flow lines is: ";FlowMap.FlowMethod Debug.Print " 1 = Overlay Curves, 2 = Connect Centroids" 'Change the method used to create the flow lines ' FlowMap.FlowMethod = mvFlowOverlayCurve 'Return the flow shape Debug.Print "The flow shape is: ";FlowMap.FlowShape Debug.Print " 1 = Straight, 2 = Bent, 3 =S shaped" 'change the flow shape FlowMap.FlowShape = mvFlowShapeStraight Wait 2 FlowMap.FlowShape = mvFlowShapeBent Wait 2 FlowMap.FlowShape = mvFlowShapeSFlow Wait 2 'Return whether global data are used Debug.Print "Global data are used "; FlowMap.GlobalData 'Set data limits to use globabl data FlowMap.GlobalData = True 'Change the line properties for the flow lines With FlowMap.Line .Color = mvColorRed .Style = "Dash Dot" End With 'Return the maximum flow line width Debug.Print "The maximum flow line width is ";FlowMap.MaxWidth 'Change the maximum flow width FlowMap.MaxWidth = 0.14 'Return the minimum flow line width Debug.Print "The minimum flow line width is ";FlowMap.MinWidth 'Change the minimum flow width FlowMap.MinWidth = 0.02 'Return the column for the starting PID Debug.Print "The PID is located in column ";FlowMap.PIDCol 'Change the PID column FlowMap.PIDCol = 1 'Return the arrow style for the beginning of the flow line Debug.Print "The starting arrow head is ";FlowMap.StartArrow Debug.Print " 1 = No arrow, 2 = Simple, 3 = Filled, 4 = Triangle, 5 = 2 Stick" 'Change the arrow type for the beginning of the flow line FlowMap.StartArrow = mvASSimple 'Return whether the absolute value is used Debug.Print "The absolute value is used for flow lines "; FlowMap.UseAbsoluteValue 'Use the absolute value of negative numbers FlowMap.UseAbsoluteValue = True 'Set the user defined limits FlowMap.SetUserLimits (True, 0, 50) 'Return the user defined values for the min/max flow values Debug.Print "User defined values are used for FlowMaps ";FlowMap.UserLimits 'Return the user defined maximum value Debug.Print "The maximum value is ";FlowMap.UserLimitMaxVal 'Return the user defined minimim value Debug.Print "The minimum value is ";FlowMap.UserLimitMinVal 'Return the column that the variable is located Debug.Print "The variable is in column ";FlowMap.VarCol 'Change the column that the variable is located FlowMap.VarCol = 3 End Sub