Prev: Is there an matlab plugin for eclipse ?
Next: Daq toolbox : analyse temps réel avec recouvrement.
From: sujata on 17 Jun 2010 09:29 Hi I have a GUI which is sucessfully compiled and deployed to computers which have only the Matlab runtime component installed. The tool works. However, there is one button which when clicked upon opens an microsoft excel workbook with data. I used the function winopen. When I run the GUI in MATLAB itself the button works. When compiled and the tool is opened on a computer not in Matlab environment the tool opens and works perfectly except when clicking upon that button. I get an error which says the specified file was not found when in fact the file was included in the compiling process. I do not know what the problem is because in MATLAB it works perfectly ok, but in when compiled it doesn't. Anyone know why? and what solution there is?
From: Steven Lord on 17 Jun 2010 09:46 "sujata" <sujatagp(a)gmail.com> wrote in message news:hvd7v2$qsa$1(a)fred.mathworks.com... > Hi > > I have a GUI which is sucessfully compiled and deployed to computers which > have only the Matlab runtime component installed. The tool works. > > However, there is one button which when clicked upon opens an microsoft > excel workbook with data. I used the function winopen. When I run the GUI > in MATLAB itself the button works. When compiled and the tool is opened on > a computer not in Matlab environment the tool opens and works perfectly > except when clicking upon that button. I get an error which says the > specified file was not found when in fact the file was included in the > compiling process. > > I do not know what the problem is because in MATLAB it works perfectly ok, > but in when compiled it doesn't. > > Anyone know why? and what solution there is? Not without seeing the code for that button. As a _guess_, I'd say you hard-coded the path to the workbook relative to the directory in which the GUI is located or relative to MATLABROOT. If that's the case, you probably want to use some combination of ISDEPLOYED and CTFROOT as well. http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/ctfroot.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: venkat on 18 Jun 2010 03:37 On Jun 17, 6:29 pm, "sujata" <sujatagp(a)gmail.com> wrote: > Hi > > I have a GUI which is sucessfully compiled and deployed to computers which have only the Matlab runtime component installed. The tool works. > > However, there is one button which when clicked upon opens an microsoft excel workbook with data. I used the function winopen. When I run the GUI in MATLAB itself the button works. When compiled and the tool is opened on a computer not in Matlab environment the tool opens and works perfectly except when clicking upon that button. I get an error which says the specified file was not found when in fact the file was included in the compiling process. > > I do not know what the problem is because in MATLAB it works perfectly ok, but in when compiled it doesn't. > > Anyone know why? and what solution there is? Hi, If you have given the file path hard-coded or looking in the current directory, it does not work when you are working with your installer. The exe runs at a temp path and it can't find the file you have specified. So add a file to the CTF archive while creatiting exe using MCC. Use - a filename Then use ISDEPLOYED and CTFROOT in your callback. check DOC MCC -Venky.
|
Pages: 1 Prev: Is there an matlab plugin for eclipse ? Next: Daq toolbox : analyse temps réel avec recouvrement. |