Profiles Collection

The Profiles collection contains all profiles for the map frame. The individual members of the Profiles collection are contained in the Profile object.

The following table includes all the properties for the Profiles collection.

Property

Description

Application

Returns the application object. Its a read-only property

Count

Returns the number of profiles. Its a read-only property.

Parent

Returns the parent object. Its a read-only property.

The following table includes all the methods for the Profiles collection.

Method

Description

Add

Adds a profile object.

Item

Returns an individual profile.

Example

The following script demonstrates how the Profiles collection is used in reference to the MapFrame 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 map and assigns it to the variable named "MapFrame"

Set MapFrame = Shapes.AddContourMap(SurferApp.Path+"\Samples\demogrid.grd")

 

'Declares Axes as an object

Dim Profiles As Object

 

'Assigns the Axes collection to the variable named "Axes"

Set Profiles = MapFrame.Profiles

 

End Sub