leo81
Bioengineer
- Dec 6, 2007
- 43
Hello guys,
How can I run appropriately a python script in which therare are calls to mdb objects without use the GUI?
I can start my python script with the different command lines:
abq67ef1 python myscript.py
abq67ef1 cae startup=myscript.py
abq67ef1 cae noGUI=myscript.py
but the script doesn't work anymore after executing the line:
os.system(r"c:\tempabaqus\indentation4.cae")
(to access to the .cae)
So, I can call myscript.py but it cannot execute the next commands in which there are calls to mdb objects like this:
def myinput(Youngs):
mdb=openMdb( 'Indentation4.cae')
mdb.models['Model-1'].materials['Elastic Linear'].elastic.setValues(table=((Youngs,0.4999),))
On the contrary if I execute the same strings by the python box in the GUI...it works...but it is unuseful if I would like to authomatize the process.
I hope someone could be able to help me.
Thank you very much.
Leo
How can I run appropriately a python script in which therare are calls to mdb objects without use the GUI?
I can start my python script with the different command lines:
abq67ef1 python myscript.py
abq67ef1 cae startup=myscript.py
abq67ef1 cae noGUI=myscript.py
but the script doesn't work anymore after executing the line:
os.system(r"c:\tempabaqus\indentation4.cae")
(to access to the .cae)
So, I can call myscript.py but it cannot execute the next commands in which there are calls to mdb objects like this:
def myinput(Youngs):
mdb=openMdb( 'Indentation4.cae')
mdb.models['Model-1'].materials['Elastic Linear'].elastic.setValues(table=((Youngs,0.4999),))
On the contrary if I execute the same strings by the python box in the GUI...it works...but it is unuseful if I would like to authomatize the process.
I hope someone could be able to help me.
Thank you very much.
Leo