Re: Converting a Abaqus python Macro to Simple python script

"'Guo, Yongjin (Y)' [email protected] [Abaqus]" <[email protected]> Thu, 28 Feb 2019 03:25:50 +0000
Newsgroups gmane.comp.mathematics.abaqus.user
Message-ID <CO1P164MB0055C3A4D8B6B8CF8FB57F11FE750@CO1P164MB0055.NAMP164.PROD.OUTLOOK.COM>
Mamun,

Copy your marco script as a python file. Use the following import statement (remove the sentence "import __main__"):
from abaqus import *
from abaqusConstants import *
from viewerModules import *

also write the following sentences at the end of your file:

if __name__ == "__main__":
    pressure()

Save and run the script using console:
Abaqus cae nogui=pythonFileName

You may need other statements to give the ODB file name and/or change other things.
Note: most of the import statements in the function pressure are not necessary when "from viewerModules import *" is used

Best regards,
Yongjin

------------------------------------------------------
Yongjin Guo
Materials Engineering Center
Corporate R&D, Dow Chemical