Menu entry for experiment templates
thomas_braun
#pragma rtGlobals=1 // Use modern global access method.
static StrConstant templatePath = "C:myTemplates" // change this to a path with igor packed experiment templates
static StrConstant templateSuffix = ".pxt"
Menu "File"
SubMenu "Experiment Templates"
getExperimentTemplates(),/Q, loadExperimentTemplate()
End
End
function/S getExperimentTemplates()
NewPath/Z/Q/O expTemplatePath templatePath
return IndexedFile(expTemplatePath,-1,templateSuffix)
end
function loadExperimentTemplate()
GetLastUserMenuInfo // sets S_value, V_value, etc.
string fileName = S_value
if(cmpstr(fileName,"") == 0)
print "Can't load the template due to empty filename, aborting"
return -1
else
Execute/P "LOADFILE " + templatePath + ":" + fileName
endif
end
static StrConstant templatePath = "C:myTemplates" // change this to a path with igor packed experiment templates
static StrConstant templateSuffix = ".pxt"
Menu "File"
SubMenu "Experiment Templates"
getExperimentTemplates(),/Q, loadExperimentTemplate()
End
End
function/S getExperimentTemplates()
NewPath/Z/Q/O expTemplatePath templatePath
return IndexedFile(expTemplatePath,-1,templateSuffix)
end
function loadExperimentTemplate()
GetLastUserMenuInfo // sets S_value, V_value, etc.
string fileName = S_value
if(cmpstr(fileName,"") == 0)
print "Can't load the template due to empty filename, aborting"
return -1
else
Execute/P "LOADFILE " + templatePath + ":" + fileName
endif
end
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More