DocExchangeDataFiles executes a data exchange for a complete document.
Return Value
Parameters
hDoc is a handle of an UniPlot document. hvPage is a vector with page handles.
smMatrix is a matrix with 6 columns:
| Column | Alias | Description |
|---|---|---|
| 1 | DS_FILE_ORIGIN | Original data file name. For Excel files the sheet name can be added to the file name in square brackets. |
| 2 | DS_FILE_NCNAME | Name of the NC file. |
| 3 | DS_FILE_ACTION | Action string. |
| 4 | DS_FILE_STYLEPROPS | 2D style attributes. |
| 5 | DS_FILE_STYLEPROPS3D | 3D style attributes. |
| 6 | DS_FILE_COMMENT | Comment string. |
Valid values for the action string (see example and Data=>Data Exchange (Page)):
| Value | Description |
|---|---|
| "" | (empty string), Exchange data. |
| UNCHANGED | ignore datasets. |
| SETTOZERO | set to 0. |
| SETSTYLEONLY | Only style properties will be set. The data points will not be modified. |
Example
RegisterCommand("Data", "MyDataExchange", "My Data Exchange");
UserBar_Add("MyDataExchange");
def MyDataExchange()
{
hDoc = AppGetActiveDocument();
if (hDoc == 0) {
MessageBoxError("No active Document");
return FALSE;
}
smF = DocGetDataFileList(hDoc);
smF[1;DS_FILE_ORIGIN] = "c:/programme/uniplot/samples/TEST4.xls [data]";
smF[1;DS_FILE_COMMENT] = "This is a comment";
smF[1;DS_FILE_ACTION] = ""; // Exchange data
DocExchangeDataFiles(hDoc, smF);
PageReplot(DocGetActivePage(hDoc));
return TRUE;
}
History
| Version | Description |
|---|---|
| 5.15.6 | Can be invoked with a page handle to exchange the data for one or more pages. |
| 5.11.0 | New. |
See also
Overview Documents, DocCreate, Data=>Data Exchange (Page), DocGetDataFileList, DocSetDataFileList
id-608347