I get message "ANSYS Program has stopped working" when I try to run Ansys by Matlab!
6 次查看(过去 30 天)
显示 更早的评论
I prepare a matlab code that has to use Ansys somewhere. I tried following lines;
dos('"C:\Program Files\ANSYS Inc\v140\ANSYS\bin\winx64\ansys140.exe" -p ane3fl -dir "C:\..." -b -i "C:\..\input.txt" -o "C:\...\file.out"')
%
!"C:\Program Files\ANSYS Inc\v140\ANSYS\bin\winx64\ansys140.exe" -p ane3fl -dir "C:\..." -b -i "C:\..\input.txt" -o "C:\...\file.out"
This line works properly on command prompt. But in Matlab (R2014b), Ansys stops working immediately.
I even try to write cmd lines as *.bat file and call it to Matlab however it doesn't work.
How can I fix this problem?
Thanks
0 个评论
采纳的回答
更多回答(3 个)
Walter Roberson
2015-11-9
Use Dependency Walker on ANSYS outside of MATLAB to find out which C or C++ libraries it needs. Then when you set up the dos() or system() command inside MATLAB, set up the environment so that the directory is on the search path; more on that in https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.aspx and http://stackoverflow.com/questions/694351/setting-library-path-for-win32-console-applications
Akshay Kumar
2018-6-13
编辑:Geoff Hayes
2018-6-14
Check this out, might be helpful. https://youtu.be/sE3NkH1m24w%20 using MATLAB to run (ANSYS) APDL macro code
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!