AmesimKnowledge

The File menu > Pack and Unpack

Pack and Unpack in Simcenter Amesim

How to pack a system

Pack/Unpack Model Pack Wizard

The Pack facility is guided by the Model Pack Wizard so that it is very easy to use. During the process, you can go back to previous step with the Back button.

To pack a system, follow these instructions:

Procedure

  1. Preparation

Warning This is the most important step. If you try to economize here, you may waste a lot of time in the future.

Decide on the models (.ame files) you are going to pack. Check that they are in good working order. To maximize chances of success do the following:

Run the Model update assistant and correct any problems detected.

Use File > Force model recompilation to force a recompilation. Can it find all the files properly for a successful compilation? If not, correct the problem.

Run the model and examine the results. Perform any operations you think are critical for the recipient.

If appropriate, purge the models. Determine which software package(s) the recipient will use. Will the recipient use Simcenter Amesim or Simcenter Amesim Run or both? Decide the level of security you wish to impose. Do you want to exclude source files? Do you want to exclude .spe and .sub files? Warning When you use the Pack facility, you may be informed that there is a major problem with the model. One example is that a submodel is completely missing. If this happens it probably means you did not complete Step 1 properly. Pack will allow you to continue despite problems. However, if you do this, the recipient will have the same problems!

  1. Define package properties.

The models you want to pack must be closed.

Select the menu item File > Pack to open the Model Pack Wizard.

Figure 32: Model Pack Wizard

The Package Name field must be specified. It allows you to select the directory in which you want to save the new .pck Pack/Unpack .pck file file as explained below.

To select a directory, click on the Browse button.

A Save as browser appears.

Select the directory in which you want to save your .pck file.

Enter a file name.

Click on the Save button.

In the Target Platforms area, select the platform(s) on which you expect the recipient to run the models you send.By default, the platform you are using is selected.

In the Exclude user source files area, select the files you do not want to add to the package file. This facility is very useful for confidentiality because it allows you to restrict access to vital information.

In the Options area, select the options you require:

Minimize Packaging

Minimize Packaging: Select this checkbox to ensure that only the files necessary to run a Simcenter Amesim system are included in the pack. This means that user libraries will be minimized to include only those files that are required for the submodel used.

For Simcenter Amesim Run Only

For Simcenter Amesim Run Only: Select this checkbox if the packed file is only intended to work under Simcenter Amesim Run. If models include user-submodels, the package will not contain the corresponding user libraries. When this checkbox is selected, the other options are disabled, but selected:

Click on Next to continue.

You must enter at least a package name and a platform to be able to click on Next.

  1. Select models and files to exchange

The next dialog box contains an empty list and invites you to select models and files to exchange.

To enter the names and directory of the files that you want to exchange, use the buttons Add Models and Add Files.

Figure 33: Add Models and Add Files buttons

When all necessary files have been added, click Next.

Note You must have at least one file in the list. If you want to remove a file, you can easily delete the file by pressing the Del key.

If you have forgotten to purge a model, you can select that model and click on Purge. For more information on the Purge facility, see Purge.

  1. Adding auxiliary files.

The Model Pack Wizard will search the model .ame files looking for auxiliary files. The new dialog box displays the list of files that will be contained in the package. Figure 34: List of files necessary to run the system

The list of files is displayed with a code of colors:

Color

Meaning

Black

The file is included in the pack.

Grey

The file is excluded from the pack because it is part of the %AME% (or $AME) directory. This means that the target user will have the file and it is not necessary to add it to the .pck.

Red

The Model Pack Wizard has not found the file. You must include these missing files before completing the pack.

You can deselect some files if you think they are not useful. To deselect a file, untick the checkbox in the Add column. If you want to remove all source files you can go back to the first step and tick the Exclude source files box. Note If a file is missing, a warning message will be displayed asking you if you want to continue with the pack.

If you think that a critical file is missing, click on Back and then on Add File to include it. This step requires some knowledge of the files that are necessary to run a system. If you want to know more about the files produced by Simcenter Amesim to run a system, see Special Files used by Simcenter Amesim. Click on Next.

  1. Create package file.

The new dialog box informs you on the result of the process and summarizes the basic information on the package file. Figure 35: Result of the process

Click on Finish. The process of packing files is now finished. You can send the .pck file to an other user who will then unpack the file to be able to use the system.

Unpacking a .pck file

If you receive a package file .pck containing system(s) and auxiliary files, you will have to unpack the file to be able to use the models it contains. In addition to models the .pck file may contain auxiliary files such as user submodels and supercomponents.

Warning

A potential problem is that you have already got some of these auxiliary files. If you regularly receive models from the same source, this is very likely to happen. You do not want multiple copies of these files. Model Unpack will try to avoid this happening but needs some help from you. The best method for using Model Unpack is described hereafter.

Note

Ideally you should adjust your path list so that it contains all the user Simcenter Amesim nodes that are on your disk system. At least it should contain all the important ones.

When Model Pack looks at important auxiliary files such as those associated with submodels and supercomponents, it has the Simcenter Amesim node label for the sender’s directory system. If the same node label is found in the recipient path list, Model Pack will try to install the files at this node.

You must store the models contained in the .pck in a specific directory. We recommend you create a new directory. The directory will then be empty.

To unpack a .pck file, follow these steps:

Procedure

  1. Create a new directory on your hard disk in which to unpack the pack file. We will refer to it as the extract directory.

  2. Save the .pck file in this directory.

  3. Examine your path list. Ensure that it contains all the user Simcenter Amesim nodes that are on your disk system.

  4. Click the Open button.

The Open dialog box appears.

  1. In the File type menu, select the .pck file type.

  2. Select the pack file you want to unpack and click Open.

The Model Unpack wizard opens:

Extract to common directory: Use the browse button to locate the directory you created in step one. This is the extract directory and will be where the models (.ame files) will be stored. The data files that these models require will be in subdirectories of this directory.

Customize target directories: Select the Customize target directories checkbox if you want to specify a target directory for each library. Remember that Model Pack will try to locate many auxiliary files in existing Simcenter Amesim nodes that have the same node label as on the sender’s directory system. What happens to any files that are not located in this way? By default new Simcenter Amesim nodes will be created as subdirectories of the extract folder. However, if you select the Customize target directories checkbox, you can choose the Simcenter Amesim nodes in which you want to save the files.

Select the Overwrite existing files checkbox if you want to overwrite files which are present in the target directory.

  1. Click OK.

A confirmation message appears.

  1. Click Finish.

The unpack directory opens, allowing you to select a .ame file to open.

  1. Load the models transferred and check they run correctly.

For a heterogeneous transfer:

Model Unpack will create the submodel object files by compiling the source code,

Model Unpack will also attempt to create any utility libraries (.lib or .a files) by compiling the source and building the libraries. This is normally successful if the library is arranged in a standard way.

For a homogeneous transfer, normally the object files and any .lib or .a files will have been included.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Reference/xid1493059 · retrieved 2026-07-17