Files and Commands

Executing a System Command

You can execute an operating system command from within your template-based product so that you do not have to leave your template-based product window.
You can select to display the results of the command in the Information window or the Log file. If you select to display the results of the command in the Information window, you can:
Clear the window and only view the results of the command.
Save the results of the command to a file.
If you select to display the results in the log file, you can keep the command results with the other commands that you execute so that you can cut and paste the information together into a new file.

To execute a system command within your template-based product:

1. On the Tools menu, select System Command.
The Execute System Command dialog box appears.
2. In the Command Text text box, enter the operating system command that you want to execute. See your operating system documentation for more information.
3. Select whether or not you want the output of the command to be displayed in the Information window or the log file.
4. Select OK.

Using the Log File

Your template-based product generates a log file during each session, called *.log.
While you are running Adams, you can display the current contents of the log file. In addition, you can display the log file in a text editor. The following sections explain how to display the log file in your template-based product and set the type of messages displayed.
 
Note:  
You can change the name of the log file through the initialization file .mdi_init. For more information, see Running and Configuring Adams.

Viewing the Log File in Your Template-Based Product

You can use the Log File command on the Tools menu to display the log file. You can keep the dialog box open as you execute commands so you can keep track of the commands and messages that you receive.
To help you use the log file as a command file, your template-based product marks any messages as comments so that it does not try to execute them when you import the command file. It indicates a comment by placing an exclamation mark (!) in front of the message. Your template-based product also displays as comments any commands that it executes when it starts up. To help you distinguish the startup commands from messages, your template-based product follows the exclamation mark (!) with the command prompt (>>).

To display the log file:

1. On the Tools menu, select Log File.
The Display Log File dialog box appears.
2. Select Info to display all messages written to the log file. The default is to display only warnings, errors, and fatal messages.

Updating the Log File

Your template-based product does not update the Display Log File dialog box each time you execute a command. Therefore, if you want to see the commands that you executed since you opened the dialog box, you must update the log file.

To update the contents of the log file:

From the Display Log File dialog box, select Update.

Setting the Log File Information

When you display the log file, your template-based product displays only warnings, errors, and fatal messages that you have received. You can change the type of messages that your template-based product displays as well as display the commands that your template-based product has executed. You can also display only lines that contain certain information, such as display only commands that create links, and remove any duplicate lines that occur if you encounter the same error again.

To set the type of information displayed in the Display Log File dialog box:

1. Select the Show only lines of type check box and then select one of the following:
Info - Displays all commands that you have executed in your template-based product.
Warning - Displays non-fatal messages that warn you of possible problems with commands you entered.
Error - Displays fatal messages that your template-based product did not understand and, therefore, did not successfully process.
Fatal - Displays messages that indicated that your model would not simulate.
2. If desired, select Show only lines containing and enter the text that the line must contain in the text box. You can also enter wildcards.
3. Select Apply.

To remove duplicate lines:

From the Display Log File dialog box, select Suppress duplicate lines.

Loading and Unloading Plugins

MSC has many add-on modules or plugins to template-based products, which expand their functionality. The plugins include Adams Driveline, Adams Car Ride, Adams Vibration, Adams Controls, and Adams Durability. You run these products from within your template-based product. You can set your template-based product to load them automatically when you start up. You can also unload them while in your template-based product's current session. To run a plugin, you must have a license to it.

To see if there is a license available to run a plugin:

1. From the Tools menu, select Plugin Manager.
The Plugin Manager appears.
2. At the top of the Plugin Manager, select a plugin.
3. At the bottom of the Plugin Manager, in the text box Licenses, view the number of licenses available.

To load an available plugin:

1. From the Tools menu, select Plugin Manager.
2. In the Load column, next to the plugins you want to load, select Yes.
3. Select OK.
The commands or menus for the plugins are added to your template-based product.

To unload a plugin:

1. From the Tools menu, select Plugin Manager.
2. In the Load column, next to the plugin you want to unload, clear the selection of Yes.
3. Select OK.
Your template-based product removes any plugin menus or commands.

To set up a plugin so it loads automatically when you start your template-based product:

1. From the Tools menu, select Plugin Manager.
2. In the Load at Startup column, next to the plugin you want to load automatically, select Yes.
3. Select OK.

Displaying Product Information

When using any Adams product, you can display the following information:
Software version number and the date it was built
Directory where Adams is installed
Copyright statement

To display information about your product:

1. From the Help menu, select About <product name>.
2. View the information, and then select OK.
 
Tip:  
From the Status bar, select .