🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

(Solved) Compose - Error: invalid input; cannot read file in call to function gettypeindex (T01 file)

User: "Autumn"
Altair Community Member
Updated by Autumn

Hello,

I have been using Compose to analyze data from T01 and .h3d files. I have followed the blog post Extracting and Post-Processing CAE/TEST results in Altair Compose to determine that I want some variables defined as follows

type_rbody = gettypeindex(TH_file, 'Part');
req_rbody = getreqlist(TH_file, type_rbody);
comp_rbody = getcomplist(TH_file, '', type_rbody);
req2_PlasStrain = getreqlist(h3d_file, 'Loadcase 1', 'Plastic Strain (3D)');
req2_Node = getreqindex(h3d_file, 'Loadcase 1', 'Displacement', node);

so that I can then use 'readvector' to get energy, force, etc. data. Note that TH_file and h3d_file are two string variables containing the directory+filename of the T01 and h3d file, respectively (I need to store the .oml file in a separate folder than the T01 and .h3d files).

While it mostly runs smoothly, every so often I am passed the following error:

Error: invalid input; cannot read file in call to function gettypeindex at line number 38 in file script2.oml

which is always related to the T01 file and gettypeindex in the first line of the code pasted above. Sometimes, all it takes is me restarting Compose and the problem is solved (no other changes necessary). Other times, I cannot seem to get anything to run - even if it had been working just fine earlier (with no changes).

I am wondering if there is something I am missing that is causing Compose to fail to read the T01 file occasionally? Is there perhaps a character limit for the directory + filename -- sometimes if I close Compose, change a folder name for the T01 directory (remove a space, for example), and rerun the .oml file, it works - almost as if the TH_file string was too long or wasn't being properly read.

Any suggestions or solutions would be much appreciated.

Thank you in advance for your time.

Find more posts tagged with