Permission denied when opening tcl script using hmbatch
Hi,
I am trying to create a tcl script to import .inp files from a specified folder. I am running this script from MATLAB to automate the process for several input files. I am able to run the script when I go to hypermesh>file>run>Tcl/Tk script. I can even run it from Run>Command Window with a .cmf file I created. I am not sure whether it is because I have graphics (which doesn't work with hmbatch), but I am unable to run the same thing from MATLAB.
Here is my syntax:
For importing the Abaqus input files:
*feinputpreserveincludefiles
*createstringarray 2 'Abaqus ' 'Standard3D '
*feinputwithdata2 '#abaqus/abaqus' 'filename_with_path.inp' 0 0 0 0 0 1 2 1 0
.cmf file to run in the command window:
*evaltclscript('filename_with_path.tcl', 0)
MATLAB code to run the tcl script in the command window
hypermesh_bin='C:\Program Files\Altair\11.0\hm\bin\win64\';
%enter the directory for the hypermesh executible
cd(hypermesh_bin);
% run .cmf file
dos_command = ['hmbatch -c','filename_with_path.cmf'];
dos (dos_command)
Error:
Error: Permission denied
Error: Permission denied
Error: Encountered error (check read/write permissions and file existence).
Tcl/Tk script error:
0
while executing
'*feinputwithdata2 '#abaqus/abaqus' 'C:/Users/Aruna/Documents/CART_HANDLES/MORPHED/FemCart_DU02.inp' 0 0 0 0 0 1 2 1 0 '
(file 'C:/Users/Aruna/Documents/CART_HANDLES/Refine_Mesh.tcl' line 7)
End of command file - terminating.
Error: Permission denied
HM exiting with code 0
ans =
0
What I did so far:
I looked into the instructions for dealing with 'Permission denied'. I changed the working directory and also tried deleting the hmsettings.tcl, hmmenu.set and command.cmf files from the directory.
I tried to follow the instructions posted in the following link to run tcl scripts from the command window. But I am not sure where I have to incorporate the -tcl<filename> command- in the .cmf file, or when I am running the cmf file through MATLAB??
Any help/comments are highly appreciated.
Thanks in advance!