DocAddDatafilesΒΆ
DocAddDatafiles adds a file to a set of pages or a complete document.
- hDoc = DocAddDatafiles(hDoc, rsMainFileID, svFiles)
- hDoc = DocAddDatafiles(hvPages, rsMainFileID, svFiles)
- hDoc = DocAddDatafiles(hDoc, rsMainFileID, svFiles, oPara)
- hDoc = DocAddDatafiles(hvPages, rsMainFileID, svFiles, oPara)
Return Value
Document handle hDoc is returned. Returns 0 in case of error.
Parameters
- hDoc
hDoc is a handle of an UniPlot document.
- hvPages
hvPages is a vector with page handles.
- rsMainFileID
rsMainFileID is the file that will be taken as a reference for new files addition.
- svFiles
svFiles is a vector with the path of the data files that will be imported and added to the document on the base of the rsMainFileID.
- oPara
oPara is an object created with obj_create. The object can be used to pass parameters. The default values are the last interactive specified values.
Element
Description
bUpdatePlaceholder
If TRUE (1): Dollar placeholders will be updated..
nRecordFilter
Value = 1: Use Record Filter specified in Data files, Value = 2:Use Record Filter specified in Datasets (Curve), Value = 3: Do not use Record Filter.
bAutoscale
If TRUE (1): All axes will be auto scaled.
bResetDatasetScaling
If TRUE (1): Scale factor and offset will be set to default values (1, 0).
bDisplayChannelReplaceDialog
If set to TRUE (1), a dialog box is displayed to replace missing channels by valid channels.
Example
hDoc = AppGetActiveDocument()
svFiles = GetOpenFileName("","",1,1)
rsMainFileID = 1 //Select the file to copy
if (hDoc == 0){
MessageBoxError("No open template")
return;
} else {
hDoc = DocAddDatafiles(hDoc,rsMainFileID,svFiles)
}
History
Version |
Description |
---|---|
R2025.1 |
New. |
See also
Overview Documents, DocCreate, DocExchangeDataFiles, Data=>Data Exchange (Page), DocGetDataFileList, DocSetDataFileList
id-1653200