PCL Reference Manual > XY Plot Functions > Create Action
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Create Action
This section is used to describe some of the functions used to implement the “Create” actions.
  
xy_curve_create
(curve_name, text, text_color)
Description:
 
 
This function creates a curve.
Input:
 
 
STRING
curve_name[31]
This value specifies the name of the curve to create.
STRING
text[31]
This value specifies the text for this curve.
INTEGER
text_color
This value specifies what color index to use for the text. See the remarks below for more information.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000008
The specified new title name already exists. Please check the listbox of current title names and re-input your title name.
10000009
The specified text is invalid. Please input a valid text string.
10000010
The color index has returned an invalid value.
10000102
The specified curve name is invalid.
10000104
A current curve has not been defined.
10000105
The specified curve name already exists. Please check the listbox of current curves and re-input your curve name.
10000703
The specified window name already exists.
10000705
There is no current window specified.
13000004
Duplicate entry exists in table
13000063
XY window not found
13000067
XY curve not found
 
 
 
 
Remarks:
The input value text_color can have the following values:
Color Value
Color Description
Color Value
Color Description
0
Black
8
Dark Orange
1
Red
9
Light Orange
2
Light Green
10
Dark Green
3
Yellow
11
Green
4
Blue
12
Dark Blue
5
Dark Cyan
13
Light Blue
6
Lightest Blue
14
Cyan
7
white
15
Light Cyan
Example:
Please see xy_curve_create.
  
xy_curve_current_get
(curve_name)
Description:
 
 
This function gets the current curve.
Input:
 
 
None.
 
 
Output:
 
 
STRING
curve_name[31]
This value returns the curve name.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
13000063
XY window not found
Example:
Please see xy_curve_current_get.
  
xy_curve_current_set
(curve_name)
Description:
 
 
This function sets the current curve.
Input:
 
 
STRING
curve_name[31]
This value specifies the curve name to make current.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000102
The specified curve name is invalid.
13000067
XY curve not found
Example:
Please see xy_curve_current_set.
  
xy_curve_data_file_get
(file_name, curve_name, set_number)
Description:
 
 
This function reads x and y data value sets representing curve data from a file, starting at a specific data set.
Input:
 
 
STRING
file_name[]
This value specifies the name of the file to read from.
STRING
curve_name[31]
This value specifies the curve name.
INTEGER
set_number
This value specifies the data set defining the starting point at which data will be read from the file. The file contains ascii data defining sets of X and Y data values. The first character of each line of text in the file is either the case insensitive character X or Y followed by a real number representing the data. Each X and Y data point together forms a set of data points.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
20002
String specified is too small
8103001
File Already Exists
8103002
File Not Found
8103003
Maximum File Version Exceeded
8103011
File not executable
8105001
No memory to allocate text I/O channel
8105009
Text I/O channel table full
10000011
No memory available for current XY operation.
10000014
The requested dataset is not found in the curve data file
10000102
The specified curve name is invalid.
10000104
A current curve has not been defined.
10000706
The .xyd data file has an invalid header line. The line must look like either XYDATA,curvename or YDATA,curvename.
13000004
Duplicate entry exists in table
13000067
XY curve not found
Example:
Please see xy_curve_data_file_get.
  
xy_curve_data_get
(curve_name, yonly, npoints, x_array, y_array)
Description:
 
 
This function gets curve data. It should be used in conjunction with xy_curve_num_points_get to determine the allocation size of the x and y point arrays.
Input:
 
 
STRING
curve_name[31]
This value specifies the curve name to get the curve data for.
Output:
 
 
LOGICAL
yonly
This value returns a logical which indicates whether XY, when set to FALSE, or Y data, when set to TRUE, was returned.
INTEGER
npoints
This value returns the number of points returned.
REAL
x_array(VIRTUAL)
This value returns an array of x data points. Must be allocated before use.
REAL
y_array(VIRTUAL)
This value returns an array of y data points. Must be allocated before use.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000104
A current curve has not been defined.
13000067
XY curve not found
Example:
Please see xy_curve_data_get.
xy_curve_num_points_get
(curve_name, yonly, npoints)
Description:
 
 
This function gets the number of curve data points.
Input:
 
 
STRING
curve_name[31]
This value specifies the curve name to get the curve data for.
Output:
 
 
LOGICAL
yonly
This value returns a logical which indicates whether XY, when set to FALSE, or Y data, when set to TRUE, was returned.
INTEGER
npoints
This value returns the number of points returned.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000104
A current curve has not been defined.
13000067
XY curve not found
Example:
Please see xy_curve_data_get.
  
xy_curve_data_set
(curve_name, yonly, npoints, x_array, y_array)
Description:
 
 
This function creates curves with data point values.
Input:
 
 
STRING
curve_name[31]
This value specifies the curve name which is to have data point values assigned to it.
LOGICAL
yonly
This value specifies, when set to TRUE, that only the information in the input value y_array is to be used. If this value is set to FALSE, both the input values x_array and y_array will be used.
INTEGER
npoints
This value specifies the number of points to set.
REAL
x_array(npoints)
This value specifies an array of x data points.
REAL
y_array(npoints)
This value specifies an array of y data points.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000011
No memory available for current XY operation.
10000104
A current curve has not been defined.
13000004
Duplicate entry exists in table
13000067
XY curve not found
Example:
Please see xy_curve_data_set.
  
xy_curve_list_get
(curve_list)
Description:
 
 
This function gets the list of curves.
Input:
 
 
None.
 
 
Output:
 
 
STRING
curve_list[31]()
This value returns a list of curves from the database. This array must be allocated with enough offsets to contain the entire list. Use the function xy_curve_num_get() to get the number of offsets required.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000011
No memory available for current XY operation.
13000067
XY curve not found
Example:
Please see xy_curve_list_get.
  
xy_curve_num_get
(ncurves)
Description:
 
 
This function gets the number of curves in the database.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
ncurves
This value returns the number of curves found in the database.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
None.
 
 
 
Example:
Please see xy_curve_num_get.
  
xy_title_create
(title_name, text, font_size, location, text_color)
Description:
 
 
This function creates a title.
Input:
 
 
STRING
title_name[256]
This value specifies the name of title to be created.
STRING
text[256]
This value specifies the text for this title.
INTEGER
font_size
This value specifies the font size of the text.
REAL
location(2)
This value specifies the location where the text is to be placed. Offset 1 will specify the X location and offset 2 will specify the Y location. These values can range from 1.0 to 100.0.
INTEGER
text_color
This value specifies what color index to use for the text. See the remarks below for more information.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000005
The specified XY title name is invalid. Please Input a valid title name that is 31 characters or less and contains no embedded blanks.
10000006
The XY font name typed in is invalid. Please input a valid font name.
10000007
The X and Y location must both be in %. This is a percentage of the XY window from the top left corner. Please input valid X and Y locations.
10000009
The specified text is invalid. Please input a valid text string.
10000010
The color index has returned an invalid value.
10000101
The specified title does not exist in the database.
10000705
There is no current window specified.
13000004
Duplicate entry exists in table
13000063
XY window not found
13000068
XY title not found
Remarks:
The input value text_color can have the following values:
 
Color Value
Color Description
Color Value
Color Description
 
 
 
 
 
 
0
Black
8
Dark Orange
 
1
Red
9
Light Orange
 
2
Light Green
10
Dark Green
 
3
Yellow
11
Green
 
4
Blue
12
Dark Blue
 
5
Dark Cyan
13
Light Blue
 
6
Lightest Blue
14
Cyan
 
7
white
15
Light Cyan
Example:
Please see xy_title_create (p. 1147) in the PCL Reference Manual Examples.
  
xy_title_list_get
(title_list)
Description:
 
 
This function gets the list of titles.
Input:
 
 
None.
 
 
Output:
 
 
STRING
title_list[256]()
This value returns a list of titles from the database. This array must be allocated with enough offsets to contain the entire list. Use the function xy_title_num_get() to get the number of offsets required.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
None.
 
 
Example:
Please see xy_title_list_get.
  
xy_title_num_get
(ntitles)
Description:
 
 
This function gets the number of titles in the database.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
ntitles
This value returns the number of titles found in the database.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
None.
 
 
Example:
Please see xy_title_num_get
  
xy_window_create
(window_name, x_location, y_location, width, height)
Description:
 
 
This function creates a xy window.
Input:
 
 
STRING
window_name[31]
This value specifies the name of the window to create.
REAL
x_location
This value specifies the X location for the window. This value must be greater than 0.
REAL
y_location
This value specifies the Y location for the window. This value must be greater than 0.
REAL
width
This value specifies the width of the window. This value must be greater than 0.
REAL
height
This value specifies the height of the window. This value must be greater than 0.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000007
The X and Y location must both be in %. This is a percentage of the XY window from the top left corner. Please input valid X and Y locations.
10000700
The specified window name is invalid. Enter a window name that is less than 31 characters and that has no embedded blanks.
10000702
The specified window height is invalid.
13000004
Duplicate entry exists in table
13000063
XY window not found
13000214
No corresponding message available
Example:
Please see xy_window_create.
  
xy_window_current_get
(window_name)
Description:
 
 
This function gets the current xy window.
Input:
 
 
None.
 
 
Output:
 
 
STRING
window_name[31]
This value returns the xy window name.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
13000063
XY window not found
Example:
Please see xy_window_current_get.
  
xy_window_current_set
(window_name)
Description:
 
 
This function sets the current window.
Input:
 
 
STRING
window_name[31]
This value specifies the window name to make current.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000700
The specified window name is invalid. Enter a window name that is less than 31 characters and that has no embedded blanks.
13000063
XY window not found
Example:
Please see xy_window_current_set.
  
xy_window_list_get
(window_list)
Description:
 
 
This function gets the list of xy windows.
Input:
 
 
None.
 
 
Output:
 
 
STRING
window_list[31]()
This value returns a list of xy windows from the database. This array must be allocated with enough offsets to contain the entire list. Use the function xy_window_num_get() to get the number of offsets required.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000011
No memory available for current XY operation.
13000063
XY window not found
Example:
Please see xy_window_list_get.
  
xy_window_nposted_get
(nposted)
Description:
 
 
This function gets the number of posted xy windows in the database.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
nposted
This value returns the number of posted xy windows found in the database.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
None.
 
 
Example:
Please see xy_window_nposted_get.
  
xy_window_num_get
(nwindows)
Description:
 
 
This function gets the number of xy windows in the database.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
nwindows
This value returns the number of xy windows found in the database.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
None.
 
 
Example:
Please see xy_window_num_get.
  
xy_window_post
(window_name)
Description:
 
 
This function posts a xy window.
Input:
 
 
STRING
window_name[31]
This value specifies the name of the xy window to post.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000011
No memory available for current XY operation.
10000705
There is no current window specified.
13000063
XY window not found
Example:
Please see xy_window_post.
  
xy_window_posted_get
(posted_list)
Description:
 
 
This function gets the list of posted xy windows.
Input:
 
 
None.
 
 
Output:
 
 
STRING
posted_list[31]()
This value returns a list of posted xy windows from the database. This array must be allocated with enough offsets to contain the entire list. Use the function xy_window_nposted_get() to get the number of offsets required.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000011
No memory available for current XY operation.
13000063
XY window not found
Example:
Please see xy_window_posted_get.
  
xy_window_unpost
(window_name)
Description:
 
 
This function unposts a xy window.
Input:
 
 
STRING
window_name[31]
This value specifies the name of the xy window to unpost.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
10000705
There is no current window specified.
13000063
XY window not found
Example:
Please see xy_window_unpost.