Exporting/Importing Programs

Navigation:  How to Work with Programs >

Exporting/Importing Programs

Previous pageReturn to chapter overviewNext page

 

Overview

 

Programs can be reused in other MCL-Designer projects.

To do so, you must, first, export the intended program(s) from the current project into Library (a shared folder that stores exportable elements such as data files, programs, global procedures, screens, etc.) and, second, import the required program(s) from Library into other MCL-Designer projects.

If necessary, you can lock the program being exported. This prevents the program's edition when it is imported into another project. The icon identifies the existing locked elements in Library and in the tree view of the import destination project.

 

 

To Export a Program to Library

 

Step-by step

 

1. Open the "Programs" module.

 

2. Right-click the program you want to export.

 

 

3. In the resulting menu select "Library Export" to open the "Export to Library" window.

If required, select a different source Library or rename it by clicking . See To Define a Library.

 

 

4. Fill in the following options:

 

Program Information

Program Name

Displays the program's name. Maintain or enter a new name.

Text Box

If required, add notes regarding the program being exported.

Export Options

MCL Source Code

Check this option if you want the settings/content of the program being exported to be available for editing once it is imported into another MCL-Designer V4 project.

MCL-Script (executable)

Check this option if you want to lock the settings/content of the program being exported. This means that when the program is imported into another project, it will not be editable.

This affect its display in the destination project - only the name will be visible, the original components (existing screens, routines, local procedures) will not be available in the tree view and the corresponding properties window will not be editable.

Add Program Resources(x)

If the program contains resources, check this option to ensure they are included in the export. These resources can refer to image files, sound files, text files, language files containing the exportable element's localization tags, etc.

 

 

It is possible to append project resources to the program's export, even though they are not included in the program.

a. To view all project resources, click .

b. Check the project resources you want to include in the export. (If you have checked the "Add Program Resources" option, the corresponding resources will be selected when you expand the project's resource list.)

 

c. If you want, click to hide the resource list.

 

 

5. Click to conclude the export.

 

 

As an alternative, you can use a drag-and-drop to initiate an export:

 

a. Open Library Manager (shortcut key - F4).

b. Drag the program you want to export and drop it on the "Library Manager's" window. This opens the corresponding "Export to Library" window.

c. Proceed as described in steps 4 and 5 ("To Export a Program to Library").

 

The exported program is available in the Library ("Programs" section) and ready to be imported into another project.

 

 

Click Here for Examples of Export Errors

 

 

To Import a Program from Library

 

Step-by step

 

1. Open the destination project and use one of the following to access the "Library Manager" window:

 

A. Go to the Menu Bar, click "Tools" and, in the resulting menu, select "Library Manager".

 

 

B. Click < F4>.

 

C. Right-click an empty area of the "Programs" module and select "Library Import".

 

 

D. Right-click any program of the "Programs" module and select "Library Import".

 

 

Whichever the option chosen (A, B or C or D), it opens the "Library Manager" window.

If required, select a different source Library or rename it by clicking . See To Define a Library.

 

 

 

Library elements that have speech attributes, meaning, that were created within speech projects, are identified with a (ex: "P:Receiving").

A speech element (a program, a screen, a routine, a global procedure or a global event) can only be imported into projects being developed within an MCL-Designer V4 with speech attributes/an MCL-Voice add-on.

 

2. Select the program you want to import into your current project.

 

 

3. Use one of the following to access the "Import into Project" window and continue the import operation:

 

a. Double-click the program you want to import.

 

b. Drag-and-drop the intended program into the "Programs" module.

 

 

c. Select the intended program and click .

 

d. Right-click the selected program and click the "Import to Project" option.

 

 

 

The corresponding "Import into Project" window opens.

 

 

This window displays information that cannot be edited (regarding the program being imported) and information you can edit (the "Destination" section).

 

If the destination project contains a program with the same name as the program being imported, the name of the imported program will automatically change to "..._X" ("X "refers to an incremental number.

 

If the program being imported is a "speech" program (marked with a ) and the target project is being developed with an MCL-Designer V4 that does NOT include the required MCL-Voice add-on, the "import" operation is aborted.

 

 

 

If the program being imported is "locked" (Export option that turned the selected element into a non-editable element - see To Export a Program to Library), you will not be able to edit its name. The option "Program Name" will be inactive (displayed in gray).

You can either opt to change the name of the program that already exists in the destination project (if it is not locked) and keep both programs OR  proceed with the import, in which case, the newly imported program will overwrite the one that already exists in the destination project.

 

 

4. Maintain or enter new information, as required by the project.

 

Import Program

Displays the program's name. NOT editable.

Displays the program's author and when the program was added to the Library. It can also include notes entered during the "export into Library" operation.

NOT editable.

Destination

Program Name

Option only available if the element being imported was NOT "locked" during the previous export into Library.

Maintain the suggestion or enter a new name for the imported program. Make sure the destination project does not include a program with the same name or the imported program will overwrite the one that already exists in the destination project.

Import Program Resources (x)

If the program contains resources, check this option to ensure they are included in the import. Their destination is the target project's "Resources" module.

 

It is possible to attach project resources (appended during the program's export into the Library - see To Export a Program to Library) to the program's import, even though they are not included in the program.

a. To view all project resources, click .

b. Check the project resources you want to include in the import. (If you have checked the "Import Program Resources" option, the corresponding resources will be selected when you expand the project's resource list.)

c. If you want, click to hide the resource list.

 

5. Click to conclude the program import.

 

The newly imported program is displayed in the "Programs" module and ready to be used in the project.

 

 

If the imported program uses a global variable that is already in use, in the current project, it is renamed after the global variable of the current project.

Ex: The global variable "A0", contained in the imported program is named "Test2". The global variable "A0" of the current project is named "Test1". After the program import, the global variable "Test2" is renamed "Test1" according to the global variable of the current project.

 

When the import includes language files (containing the imported element's localization tags), check the enabled languages of the destination project. If the imported language files relate to a language that is NOT enabled in the destination project, you have to define it as a project language in the project's "Localization" tab (a project properties tab). See Localization.

Ex: The import of a program that includes a language file in "Dutch" into a project that only has "French" as an enabled language, will require that you add "Dutch" to the list of project enabled languages (in the "Localization" tab). If you skip this step, the imported "Dutch" language file will NOT be available for use.

 

 

Click Here for Example 1 of an Import Alert

 

       Click Here for Example 2 of an Import Error