CHT_SPC

This command uses an SPC chart or Desktop to create an HTML file and returns the name and location of this HTML file. It also provides the names and locations of any supporting files that are needed by the HTML file.

Syntax

CHT_SPC chart_type, "array_name"

chart_type

explanation

0

Control Chart

1

Histogram

2

Statistics List

3

Trend Chart

4

Data Table

5

Report Writer (single)

6

EWMA Chart

7

Moving Average Chart

8

Scatter Chart

9

Combination Chart

10

Control and Bar Chart

11

Time Axis Chart

12

CuSum/Control Chart

13

X-Bar/Moving range/Range Chart

100

Multiple Charts

101

Multiple Capability / Box & Whisker

102

Statistics Table

103

Report Writer (multiple)

104

Group Chart

105

Multiple Data Table

106

Combined Control Chart

200

Desktop

1001

1st MINITAB chart

1002

2nd MINITAB chart

...

....

array_name

explanation

blank

Use the standard that has been selected for the current row of the template.

name of a MySArr

Before executing the CHT_SPC command, use the MYSARR command to do one of the following:

 If you are retrieving a Desktop, set the value of MYSARR "array_name", 1 equal to the name of the Desktop you want to retrieve.

 If you are drawing a chart for one or more standards, set the value of MYSARR "array_name", 1 equal to the name of the first SPC standard; MYSARR "array_name", 2 equal to the name of the second SPC standard; etc.

Return value

This command returns a string that contains the name and location of the HTML file it has created.

If the specified chart could not be generated, this command returns an empty string.

Notes

Additional options for sending SPC charts to HTML are set by the CHT_OPT_SPC command.

For any supporting files (e.g., *.jpg, *.gif, *.htm) that are needed by this HTML file, the CHT_SPC command also sets the value of MYSARR "Cht_SPC_Support", 1 equal to the name of the first supporting file; MYSARR "Cht_SPC_Support", 2 equal to the name of the second supporting file; etc. It also sets the value of MYSARR "Cht_SPC_Support", 0 equal to the location of these supporting files.

If you specify a "single" chart (chart_type parameters 0-13 and 1001 and greater) with a MYSARR that references multiple standards, the CHT_SPC command will generate one HTML file for each chart and one additional HTML file containing links to the HTML files for the charts. After the user clicks a link to view the chart, they can click the chart window's button to return to the page containing the links.

If the specified chart could not be generated, the CHT_SPC command puts the error message in a string variable named MySVar "Chart_Error".

If you find that the focus does not returns to the SPC Data Entry module after executing this command, use the formula PBUFF : CLOSE_PBUFF to return the focus to the SPC Data Entry module.

Note: If this command is executed when the SPC Charts and Reports module is already open on the workstation, it will close the SPC Charts and Reports module.

See also: DE_CHART

Examples

CHT_SPC 0, ""

This formula generates a control chart for the standard that has been selected on the current row of the template, and then it then uses this chart to create an HTML file.

This formula returns the name and location of the HTML file, and it uses MYSARR "Cht_SPC_Support" to report the names and locations of supporting files that are needed by this HTML file.

MySVar "HTML" = CHT_SPC 0, ""

This formula generates a control chart for the standard that has been selected on the current row of the template, and then it then uses this chart to create an HTML file.

This formula sets the value of MySVar "HTML" to the name and location of the HTML file, and it uses MYSARR "Cht_SPC_Support" to report the names and locations of supporting files that are needed by this HTML file.

MySArr "DesktopName", 1 = "11426 - weekly" :
MySVar "webpage" = CHT_SPC 200, "DesktopName"

This formula first sets the Desktop name "11426 - weekly" to a MySArr variable.

Next, it retrieves this Desktop and uses it to create an HTML file.

Finally, this formula sets the value of MySVar "webpage" to the name and location of the HTML file, and it uses MYSARR "Cht_SPC_Support" to report the names and locations of supporting files that are needed by this HTML file.

MySArr "Standard", 1 = "A-50RB Length" :
MySVar "webpage" = CHT_SPC 9, "Standard"

This formula first sets the standard name "A-50RB Length" to a MySArr variable.

Next, it generates a combination chart for this standard and uses it to create an HTML file.

Finally, this formula sets the value of MySVar "webpage" to the name and location of the HTML file, and it uses MYSARR "Cht_SPC_Support" to report the names and locations of supporting files that are needed by this HTML file.

MySArr "Standard", 1 = "A-50RB Length" :
MySArr "Standard", 2 = "A-50RB Width" :
MySArr "Standard", 3 = "A-50RB Height" :
MySVar "webpage" = CHT_SPC 1, "Standard"

This formula first sets the standard names "A-50RB Length", "A-50RB Width" and "A-50RB Height" to a MySArr variable.

Next, it generates a histogram for each standard and creates an HTML file for each histogram. It also creates an HTML file with links to all of the chart files.

Finally, this formula sets the value of MySVar "webpage" to the name and location of the HTML file that contains these links, and it uses MYSARR "Cht_SPC_Support" to report the names and locations of supporting files that are needed by this HTML file.

MySArr "Standard", 1 = "A-50RB Length" :
MySArr "Standard", 2 = "A-50RB Width" :
MySArr "Standard", 3 = "A-50RB Height" :
DE_CHART
1, 300, (CHT_SPC 101, "Standard"), ""

This formula first sets the standard names "A-50RB Length", "A-50RB Width" and "A-50RB Height" to a MySArr variable.

Then it generates a Multiple Capability chart for these standards, uses this chart to create an HTML file, and displays this HTML file in the data entry chart window for template row 1.