Starting PowerBuilder with an open workspace/solution

When you start PowerBuilder, you might want to resume work on an existing project. You can have PowerBuilder open the workspace/solution that you used last, and even open the painters you had open, with the last Script editor you touched open at the code you were working on.

Using options in the development environment

There are three options on the Workspaces/Solution page of the System Options dialog box that you can use to determine what displays when you start PowerBuilder.

To open the System Options dialog box

  • Select Tools>System Options from the menu bar.

Opening just the workspace/solution

If you want PowerBuilder to open the last workspace/solution you used at startup, select the Workspaces/Solutions page and then check Reopen Workspace/Solution on Startup.

Opening the workspace/solution, painters, and scripts

If you want PowerBuilder to open the last workspace/solution you used and the painters and editors you were using, check Reopen Workspace/Solution on Startup and Reload Painters When Opening Workspace/Solution. When you open PowerBuilder, any painters and editors that were open when you closed PowerBuilder are reloaded. If you edited a script before closing PowerBuilder, the Script editor is scrolled to show the last line you edited.

Opening with no workspace/solution

If you want PowerBuilder to open without loading a workspace/solution, clear Reopen Workspace/Solution on Startup. If you want the painters and editors that were open when you last used a workspace/solution to be reloaded when you reopen it, clear Reopen Workspace/Solution on Startup and check Reload Painters When Opening Workspace/Solution.

Displaying the Welcome dialog box

If you want to see the Welcome to PowerBuilder dialog box when you start PowerBuilder, check Show Start Dialog at Startup with no Workspace/Solution and clear Reopen Workspace/Solution on Startup. The Welcome to PowerBuilder dialog box is shown in The PowerBuilder environment.

Using a workspace/solution file

Double-click a workspace/solution file in Windows Explorer. Workspaces have a .pbw extension, solutions have a .pbsln extension. PowerBuilder starts with the workspace or solution open.

Using command line arguments

You can log in PowerBuilder from a command line (or the Windows Run dialog box) if you have an online license for PowerBuilder.

The syntax is:

directory\pb250.exe {/AC useraccount} {/PW password} {/RC value} {/ALS value} {/SOE value}

or

directory\pb250.exe {/LIF loginfile}

where directory is the fully qualified name of the directory containing PowerBuilder.

For example,

pb250 /AC test@appeon.com /PW xxxxxxx /RC N /ALS N /SOE Y

or

pb250 /LIF c:\test.ini

Option

Description

/AC

User Account.

/PW

User Password.

/RC

Remember Credentials (Y or N), default is Y. /RC is always Y when /ALS is Y. Therefore, the /RC value will be ignored, if /ALS is set to Y. This parameter takes effect only when both /AC and /PW are set.

/ALS

Auto Login at Startup (Y or N), default is Y. This parameter takes effect only when both /AC and /PW are set.

/SOE

Sign Out on Exit (Y or N), default is Y. This parameter takes effect only when both /AC and /PW are set.

/LIF

The full path to the license login initialization file which contains your encrypted password and other login settings. The file is created by an independent tool (%AppeonInstallPath%\PowerBuilder [version]\Tools\LoginIniFileCreator.exe). You can specify the user account, the password, the login settings, and the file path in this tool. The password will be encrypted in the generated file to protect your login credentials. (If you want to copy the tool to other places, make sure to copy LoginIniFileCreator.exe, LoginIniFileCreator.dll, and LoginIniFileCreator.runtimeconfig.json under the same folder, and make sure the machine has .NET Desktop Runtime 6.x installed).


You can also start PowerBuilder from a command line and optionally open a workspace/solution, target/project, and/or painter. These are the painters and tools you can open:

  • Application painter

  • Database painter

  • Data Pipeline painter

  • DataWindow painter

  • Debugger

  • File Editor

  • Function painter

  • Library painter

  • Menu painter

  • Query painter

  • Structure painter

  • User Object painter

  • Window painter

The syntax is:

directory\pb250.exe {/workspace workspacepath} {/target targetpath} {/painter paintername} {/output outputpath}

where directory is the fully qualified name of the directory containing PowerBuilder.

You can also add one or more of the following options to the command line after /painter paintername to open a specific object or create a new one:

{/library libraryname} {/object objectname} {/inherit objectname} {/new} {/run} {/runonly} {/argument arguments}

The syntax statements show the long form of option names. You need only use the initial letter or letters of the option name as long as the option is uniquely identified, as shown in the following table.

Option

Description

/W workspacepath or solutionpath

Opens the workspace workspacepath or solution solutionpath. The default is the most recently used workspace/solution if you have selected the Reopen Workspace/Solution on Startup check box in the System Options dialog box. If you have not selected this check box, you must specify the /W option before specifying any other options.

/T targetpath or projectpath

Opens the target targetpath or project projectpath.

/P paintername

Opens the painter paintername. The default is the window that displays when you begin a new PowerBuilder session.

The painter name must uniquely identify the painter. You do not have to enter the entire name. For example, you can enter q to open the Query painter and datab to open the Database painter. If you enter the full name, omit any spaces in the name (enter UserObject and DataPipeline, for example).

The painter name is not case sensitive. To open the file editor, you could set paintername to FI or fileeditor.

Except for the /W, /T, and /L switches, other switches must follow /P paintername on the command line, as shown in the examples after the table.

/OU outputpath

Logs the contents of the Output window to outputpath.

/L libraryname

Identifies the library that contains the object you want to open.

/O objectname

Identifies the object, such as a DataWindow object or window, you want to open.

/I objectname

Identifies the object you want to inherit from.

/N

Creates a new DataWindow object.

/R

Runs the DataWindow object specified with /O and allows designing.

/RO

Runs the DataWindow object specified with /O but does not allow designing.

/A arguments

Provides arguments for the specified DataWindow object.


Examples

The following examples assume that the location of the PowerBuilder executable file is in your system path.

This example starts a PowerBuilder session by opening the Window painter in the Client PBL in the Math workspace. The output of the session is sent to a file called math.log. The workspace file, the PBL, and the log file are all in the current directory:

pb250 /w Math.pbw /l Client.pbl /p window /out math.log

Enter this command to start PowerBuilder and open the DataWindow object called d_emp_report in the workspace Emp.pbw:

pb250 /w D:\pbws\Emp.pbw /P dataw /O d_emp_report

Building from the command line

You can also build and deploy a workspace/solution from the command line. For more information, see Building workspaces/solutions.