LineFormat Object
The LineFormat object contains the properties associated with lines. This object is used to encapsulate the line properties within other objects.
The following table provides all properties of the LineFormat object.
Property |
Description |
Returns the application object. It is a read only property. |
|
Returns/sets the line color as an RGB value. The ForeColor property is superseded by ForeColorRGBA property. ForeColor has been preserved for backwards compatibility. |
|
Returns the RGBA color object. it is a read only property. |
|
Returns the parent object. It is a read only property. |
|
Returns/sets the line style. |
|
Returns/sets the line width in page units. |
Example
The following script demonstrates how the LineFormat object is used in reference to the Level object.
Sub Main
'Declares SurferApp as an object
Dim SurferApp As Object
'Creates an instance of the Surfer Application object and assigns it
'to the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Makes Surfer visible
SurferApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a plot document in Surfer and assigns it to the variable
'named "Plot"
Set Plot = SurferApp.Documents.Add(srfDocPlot)
'Declares Shapes as an Object
Dim Shapes As Object
'Assigns the Shapes collection to the variable named "Shapes"
Set Shapes = Plot.Shapes
'Declares MapFrame as an object
Dim MapFrame As object
'Creates a contour map and assigns the map coordinate system to the
'variable named "MapFrame"
Set MapFrame = Shapes.AddContourMap(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")
'Declares ContourLayer as an object
Dim ContourLayer As Object
'Assigns the contour map properties to the variable named "ContourLayer"
Set ContourLayer = MapFrame.Overlays(1)
'Declares Levels as an object
Dim Levels As Object
'Assigns the Levels collection to the variable named "Levels"
Set Levels = ContourLayer.Levels
'Declares SeventhContour as an object
Dim SeventhContour As Object
'Assigns the seventh contour to the variable named "SeventhContour"
Set SeventhContour = Levels(7)
'Declares LineFormat as an object
Dim LineFormat As Object
'Assigns the line properties of the contour level to the variable
'named "LineFormat"
Set LineFormat = SeventhContour.Line
End Sub