All commands are ultimately executed in the kernel process, but there are several ways this can be accomplished:
You can execute kernel commands from a file by using the –start or –replay options on the command line.
You can execute kernel commands from a file by using File->Run Script
You can type kernel commands in the ABAQUS/CAE CLI
The GUI mode infrastructure can send a command string from the GUI to the kernel process for execution (see Command processing, Section 7.2.4 for details).
You can issue a kernel command directly from the GUI using the sendCommand function.
The sendCommand function takes three arguments:
A required string argument specifying the command to be executed in the kernel.
Two optional Boolean arguments, writeToReplay and writeToJournal.
ABAQUS Scripting Interface commands automatically journal themselves. As a result, if you use the sendCommand function to issue an ABAQUS Scripting Interface command, you should not set writeToJournal=True. Otherwise, the command will be recorded twice in the journal file. For more information, see ABAQUS/CAE command files, Section 9.5 of the ABAQUS/CAE User's Manual.
In general, you should enclose this function in a try block to catch any exceptions that might be thrown by the kernel command. In order for exceptions to be caught, they should be class-based exceptions and not simply strings. For example:
from abaqusGui import sendCommand try: sendCommand('print "this is a test"') except: print 'something went wrong'