Creating a New Program

Navigation:  How to Work with Programs >

Creating a New Program

Previous pageReturn to chapter overviewNext page

 

Overview

 

Creating a new project automatically starts with a program ("P:Main"), as referenced in Creating a New Project. It is not possible to rename this Main Program.

 

 

To Create a Program

 

Use one of the following methods to add a program to the "Programs" module:

 

A. Use the direct "Add a Program" option.

 

1. Right-click an empty space inside the "Programs" module.

 

2. Select “Add Program” in the resulting menu. This opens the following window:

 

 

3. If necessary, rename the new program and add relevant information in the "Notes" text box.

 

The name for the program MUST be unique throughout the project (ex: You cannot have a program and a global procedure with the same name).

 

 

4. Click to conclude.

 

OR

 

B. Import a program from library using "Library Manager". See To Import a Program from Library.

 

OR

 

C. Duplicate a program.

 

1. Select the appropriate program in the module's tree view and right-click it.

 

2. In the resulting menu, click “Duplicate Program”.

 

This duplicates all the elements (screens, controls, actions and processes) contained in the selected program. The duplicate program has the same name as the original one plus an incremented number.

 

3. Open its properties window (right-click the duplicate program and select "Edit") to rename it and, if necessary, add relevant information.

 

 

Although it is possible to create a project with just a Main Program, it is recommended to distribute project functionalities in several programs. This eases debugging and allows for a smoother application running.

 

Ex: A basic inventory application/project that contains 4 programs.

 

That first program ( = Main Program) contains the menu. Another program ( = Application Program) concerns itself with the Login task, a third program ( = Application Program) is used for the Inventory task and a final one ( = Application Program) handles the communications.