ActiveField - QuickField API help

QuickField Student Edition free download     Contacts

ActiveField Technology

Objects Overview

Hierarchy Chart

How to Start: Application Object

How to work with Problems

How to work with Model

How to work with Data

How to Analyze Results




TimePlotPoints Object




Collection of points in a model, where one or more field quantities are calculated for plotting versus time.


The TimePlotPoints collection of TimePlotPoint objects contains all the points in a model, where one or more field quantities are calculated for plotting versus time. This collection is accessible by the Points property of the TimePlotPicture object. Initially, when the TimePlotWindow is created, the collection is empty. You can add and remove individual points from the collection, enumerate through the points and access each of them individually.

The TimePlotPoints collection provides the following methods and properties:

Iterate through the points

Item (index as Variant)
method as TimePlotPoint

Returns the TimePlotPoint by its one-based number.

Count property as Long.

Returns the number of points in collection.

Add and remove points

Add (p as Point) method
as TimePlotPoint.

Adds a new TimePlotPoint which position is denoted by the p parameter or returns an existing one.

Remove (index as Variant) method.

Removes the point by its one-based index.

In the following example we first remove all points, then add 10 points distributed evenly along the y-axis, and then switch on the temperature curve for each point. Please note, that the nCount variable set by the Count property my by less than 10, if some automatically calculated points situated outside the model.

' Assume that
'     timeView as QuickField.TimePlotWindow, and
'     QF as QuickFiel.Application
' were defined somewhere above

Dim tsSet As QuickField.TimePlotPicture
Set tsSet = timeView.PlotSettings
With tsSet
    Dim pItem As QuickField.TimePlotPoint
    ' First remove all the old points
    For Each pItem In .Points
    .Points.Remove (1)

    ' Now calculate point's coordinates
    ' and add them to the collection

    Dim i As Integer
    For i = 0 To 9
        .Points.Add QF.PointXY(0, i * 5)
    ' Swith on the temperature curve
    ' for each point

    For Each pItem In .Points
        pItem.curve(qfPotential) = True
    ' Calculate how many points we have got
    Dim nCount As Integer
    nCount = .Points.Count
End With
' Apply the settings to the TimePlotWindow
timeView.PlotSettings = tsSet