Writing the inp file?
Writing the inp file?
(OP)
Hi
A seemingly simple question this time, but the manual isn't being helful today:
I have a script that imports some geometry into Abaqus CAE, generates the necessary meshes, materials, interactions, etc. Generally right down to the point where I only have to submit the job.
Now I'd like the script to write out the inp file, like I can do from the menu in CAE. But this action isn't recorded in the rec file. I'm sure there's a scripting command to write an input file for a given model or job, but I can't seem to find it.
Thanks in Advance
A seemingly simple question this time, but the manual isn't being helful today:
I have a script that imports some geometry into Abaqus CAE, generates the necessary meshes, materials, interactions, etc. Generally right down to the point where I only have to submit the job.
Now I'd like the script to write out the inp file, like I can do from the menu in CAE. But this action isn't recorded in the rec file. I'm sure there's a scripting command to write an input file for a given model or job, but I can't seem to find it.
Thanks in Advance





RE: Writing the inp file?
RE: Writing the inp file?
However, thanks to your hint, I was able to locate '22.1.6 writeInput()', which I suspect is exactly what I was looking for. Thanks.
I suspect the discrepancy stems from us looking at two different versions. I was referring to the 6.5 Manual.
RE: Writing the inp file?
I've tried:
mdb.Job['Job-1'].writeInput()
with Job-1 being the name of my test job, but it only produces an error:
TypeError: unscriptable object
If I click 'Write Input' in the job manager, the .inp file is written without any problems. Can someone show me what I'm doing wrong?
RE: Writing the inp file?
I believe the correct script in your case should be:
mdb.jobs['Job-1'].writeInput()
I hope this helps
bfillery
RE: Writing the inp file?
RE: Writing the inp file?
As a guide, methods such as "Job" that have a capital letter are constructors. The writeInput() method operates on an object which you have to reference from a container, which in general is lowercase and plural "jobs"... Perhaps this makes sense? ;)
RE: Writing the inp file?
Having a short, one line, example of the syntax in the manual would be a great help sometimes.