This command is very useful, but when I use it I lose the Origin directory (C:\Program Files\Originlab\Origin61\). How can I reset this? I try to use: %Z=”C:\Program Files\Originlab\Origin61\fileName”; open –n %Z; but keep getting the error message: C:\PROGRAM file not found.
I believe the problem is the space in the directory name. You are not loosing the Origin directory, it's still saved in the %Y variable. You just need quotes around the %Z in the open command. (Mike's code should work!)
This worked for me. (Origin 6.1 SR4)
fdLog.openPath(Z); %Z=; //Report Selected path
%Z="%YCraig\DP_updates\HBTvars.dat"; open -n "%Z";
yes, i understand that the space is the problem, but how can I solve it. none of the scripts have work for me so far.
I'm using OriginPro 6.1, I'm developing a dialog for Origin, in which I have a browse for folder button; and after clicking there nothing works any more.
Both the scripts that Mike and I posted work for me. I suspect the error is somewher else in your script. At this point the best thing to do is post the script or send it to me and I'll see if I can find the error.
You should also make sure you're running the latest service pack to use the fdlog.openPath(Z) function.