AmesimKnowledge

The File menu > Pack and Unpack

Running Unpack from the Command line

You can use the Unpack feature through the command line. The name of the function is AMEUnpack.

Note

This tool is available both under Windows and Linux.

Help

To display the help for the AMEUnpack feature, run the command AMEUnpack --help. The different options are displayed:

Figure 36: AMEUnpack Help

Unpacking a model

To unpack a model, navigate to the directory containing the pack file. Using the AMEUnpack command you can create an empty directory and unpack your files into it. For example, the command AMEUnpack my_pack_file.pck -c -t output creates (-c) a directory named (-t) output and unpacks all files into it:

Figure 37: Unpacking to a directory

Unpacking multiple package files into subdirectories

You can unpack multiple pack files into sub-directories using the argument -s. For example, the command AMEUnpack my_pack_file.pck two_file_pack.pck -t output -s unpacks the two .pck files (named my_pack_file.pck and two_file_pack.pck) to sub-directories in the output folder:

Figure 38: Unpacking multiple files

Overwriting files

You can define whether AMEUnpack overwrites existing files with the same name, leaves them untouched, or stops the process on finding an existing file, with the arguments -o yes, -o no and -o abort.

For example:

  • AMEUnpack my_pack_file.pck -t output -o yes: overwrite any existing files in the output folder. Warning This is the default option; even if you do not use the -o argument, any existing files will be overwritten.

  • AMEUnpack my_pack_file.pck -t output -o no: leave any existing files in the output folder unchanged.

  • AMEUnpack my_pack_file.pck -t output -o abort: stop the unpack process on detecting any existing files in the output folder. In this case, a warning message is displayed:

Figure 39: Unpack aborted

Writing the output to a log file

Instead of writing the result of the process to the command window, you can write to a log file using the -l option. AMEUnpack test_model_with_lib.pck -c -t output2 -s -l unpack_result.txt unpacks the test_model_with_lib.pck package to the output2 directory (in subdirectories) and writes the result of the unpack process to the unpack_result.txt file.

Figure 40: Writing output to a log file

Update path list

You can add the unpacked libraries in your .pck file to the Current path list using the -u argument. For example, AMEUnpack my_pack_file.pck -t output -u unpacks the my_pack_file.pck pack file to the output folder and adds that folder to the path list.

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