Returns a string containing the requested Origin path.
VB: Function Path(Type As ByVal APPPATH_TYPES ) As String
C++: LPCSTR Path(APPPATH_TYPES Type )
C#: string Path(APPPATH_TYPES Type )
Private Sub MySampleProject() Dim originApp As Origin.ApplicationSI Dim projectName As String Dim path As String ' Connect to Origin Set originApp = New Origin.ApplicationSI ' Init the project file name projectName = "2D Bin and Fit.opj" ' Load the project from the installation folder path = originApp.path(APPPATH_PROGRAM) + "Samples\Curve Fitting\" + projectName originApp.Load (path) ' Save the project to the User Files Folder path = originApp.path(APPPATH_USER) + projectName originApp.Save (path) End Sub
using Origin; static void TestPath() { // Connect to Origin. Origin.ApplicationSI originApp = new Origin.ApplicationSI(); // The file name of a sample Origin project. string strFileName = "2D Bin and Fit.opj"; // Create the full path of the file for loading and ask Origin to load the project. string strFullFileName = originApp.Path(APPPATH_TYPES.APPPATH_PROGRAM) + "Samples\\Curve Fitting\\" + strFileName; originApp.Load(strFullFileName, System.Type.Missing); // Create the full path of the file for saving and ask Origin to save the project. strFullFileName = originApp.Path(APPPATH_TYPES.APPPATH_USER) + strFileName; originApp.Save(strFullFileName); }
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW filePath = app.Path(app.APPPATH_PROGRAM) + "Samples\\Curve Fitting\\" + "2D Bin and Fit.opj" app.Load(filePath)
8.0SR2