PCL Reference Manual > Introduction > Features of Session and Journal Files
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Features of Session and Journal Files
Both session and journal files contain comments and calls to PCL functions. Entries to these files are made in response to six types of user inputs: changes in settings made through the menu bar, inputs made through the icons to the far right on the menu bar, the switch bar, the tool bar, the command line, and directly through calls to PCL functions.
These files can be played back through Patran, repeating the operations listed in the files. There are some limitations caused by what is recorded in these files and how they are played back. Some editing may be required to work around these limitations to get the desired results from a play back of these files.
One of the limitations of the these files are in the area of file paths. When Patran opens a database, both the path to the file and the file name are recorded in journal and session files as literal strings (the listing has been reformatted to better fit the page):
uil_file_rebuild.start 										 @
	(“/some_other_system/patran/patran3/template.db”,									 @
	“/my_system/wriggler.db”)
The source file path for the template file (“/some_other_system/patran /patran3/template.db”) was applied either by the user when the template file for the database was specified or from the default path and file settings. The default path is “/patran/patran3” but can be modified with the environment variable P3_HOME. The default template file name is “template.db”. If this session or journal file is executed on a different machine these path settings will be different and this file will require editing to make this command work.
When a command in a session or journal file spawns another process, the results of executing a journal or session file may create results that are different from the Patran session that created the original file. If a session file passes a model to the translator for MSC Nastran, it will set up the files that MSC Nastran needs and start MSC Nastran. MSC Nastran runs as a separate process and Patran may or may not wait until the MSC Nastran process is done. If the session file is set not to wait for the process to finish, it will immediately move on to the next operation. If the next operation is to read the results of the MSC Nastran process which do not yet exist, playback of the journal or session file will fail. This situation will again require some editing to fix.
During a Patran session, all operations are recorded in the journal and the session files. When an operation requires user input through a popup form, the answer provided by the user is always recorded in the session file but is sometimes not recorded in the journal file. The instances where user input is required, but not recorded in journal files, can cause problems when a journal file is played back through Patran. When the journal file playback gets to the point where user input is required, playback will stop until the user input is provided. If the user input is different than that provided when the journal file was made, the results of the playback will be modified.
Journal and session files not only record the operations executed by the user but also the exact order in which those operations where executed by Patran. The order in which these operations are recorded can affect the behavior of the playback of the journal and session files in which these operations are recorded. For example: creating two surfaces in a model by using “Geometry”, “Create”, “Surface”, “XYZ” and using the same vector and origin coordinate lists for both surfaces will cause a popup form to appear warning the user of the duplicate surfaces created by the operation. If the user repositions or resizes the model viewport while the popup form is on the screen and then answers the popup form after modifying the viewport, the PCL commands to modify the viewport will be recorded in the journal and session file before the reply to the popup form. When the journal or session file is played back using Patran, the reply the user supplied will be lost because of the order in which the operation commands where recorded and the user will be prompted with a popup form to supply the missing information.
These issues with journal and session files do not limit the usefulness of these files but they do point
out areas where the playback of a journal or session file may yield results that are different from what was expected.