auto_LoadDatasetΒΆ

auto_LoadDataset loads a 1D, 2D, or 3D dataset from a data file opened with the function auto_ImportData.

hData = auto_LoadDataset(ssDiagram, ssYName)
hData = auto_LoadDataset(ssDiagram, ssXName, ssYName)
hData = auto_LoadDataset(ssDiagram, ssXName, ssYName, ssZName)
hData = auto_LoadDataset(hLayer, ssYName)
hData = auto_LoadDataset(hLayer, ssXName, ssYName)
hData = auto_LoadDataset(hLayer, ssXName, ssYName, ssZName)

Return Value

hData is a handle of the new dataset (see example).

Parameters

ssDiagram

ssDiagram is the name of the diagram in which the dataset should be displayed.

hLayer

hLayer is the diagram handle (see PageGetLayerHandle).

ssXName

ssXName is the channel name with the x-coordinates. Check the channel name spelling in the dialog box File=>Import Data.

ssYName

ssYName is the channel name with the y-coordinates. Check the channel name spelling in the dialog box File=>Import Data.

ssZName

ssZName is the channel name with the z-coordinates. Check the channel name spelling in the dialog box File=>Import Data.

Comment

Notes for curve style files: For 1D and 2D datasets the curve style will be copied from the curve style file. A counter for each diagram is used to select the curve style. The first dataset added to the diagram will use the curve style with index 1. The second dataset will use curve style with index 2 and so on. To set the counter for a diagram call auto_SetDatasetStyle.

Example

If the function is called with only one variable name, a 1D dataset will be created. Example:

auto_LoadDataset("Diagram 1", "Signal")

If the function is called with two variables, a 2D diagram will be created. Example:

auto_LoadDataset("Diagram 1", "Speed", "Torque")

If the function is called with three variables, a 3D dataset (contour map) will be created. Example:

auto_LoadDataset("Diagram 1", "Speed", "Torque", "be")

The following example shows how a dataset is scaled. The function auto_LoadDataset returns a value (Handle), which can be used to access the dataset:

hData = auto_LoadDataset("Diagram 1", "Speed", "Torque")
if (hData != 0) {
    yscale = 2.0;
    yoffset = 1.0;
    XYSetScaleOffset(hData, [1,0,yscale, yoffset]);
}

History

Version Description
R2013.14 New first parameter hLayer.

id-404676