How to create an additional PowerFactory shortcut and change its options?

Category:
Installation and Licensing
Answer

It is possible to create a shortcut to the PowerFactory.exe and give it some additional commands in order to run PowerFactory in different modes, which will allow you to have the same version of PowerFactory in parallel.

One use case can be that PowerFactoy should be opened with a certain user. So it is possible to specify the user name directly in the target of the PowerFactory shortcut. To do this you have follow these steps:

  • Copy the Powerfactory.exe from the installation directory and paste a shortcut in a different location.
  • Open the properties of the shortcut
  • Extend the current link after creating the shortcut from:

"C:\Program Files\DIgSILENT\PowerFactory 20XX SPX\PowerFactory.exe"

To:

"C:\Program Files\DIgSILENT\PowerFactory 20XX SPX\PowerFactory.exe" /username “MyName”

  • Now you can open the shortcut and the user “MyName” will be logged in. (It only works with existing user names). If you want to log in as Administrator this can be very useful.

 

Many setting can be given to the PowerFactory application via the ini file. Example are the Language PowerFatory should use and the path to the database directory.

To configure a second ini file follow these steps:

  • Copy the ‘PowerFactory.ini’ file from the PowerFactory installation directory and past it in a dedicated folder
  • Create a shortcut of the ‘PowerFactory.exe’.
  • Open the properties of the shortcut
  • Extend the current link after creating the shortcut from:

"C:\Program Files\DIgSILENT\PowerFactory 20XX SPX\PowerFactory.exe"

To:

"C:\Program Files\DIgSILENT\PowerFactory 20XX SPX\PowerFactory.exe" /ini “D:\path\PowerFactory.ini”

By giving it the link to the intended ini file.

  • Now the shortcut of the PowerFactoryexe is linked to the ini file and the ini file can be modified to change settings of PowerFactory. In the copied ini file you should find some information about the licence and the external applications like the selected Python version for example. But depending on your configuration you might have more information in the ini file.
  • First we will change the language:
    • Identify the section [general] in the ini file. It it is not there just write it into the ini.
    • Specify the intended language (in this example to English:
      • [general]
      • language = en
    • The available languages are "cn" (Simplified Chinese), "de" (German), "en" (English), "es" (Spanish), "fr" (French), "ru" (Russian), or "tr" (Turkish)
    • The PowerFactory shortcut will still access the original database but only open PowerFactory in the specified language.

 

  • Also in the general section of the ini, it is possible to specify the workspace directory. This enables us to use a different database then in the original installation. The commands for this are:
    • backupDirectory = D:\path\MyWorkspace.backup
    • workspaceDirectory = D:\path\MyWorkspace
  • When opening PowerFactory the folders for the new workspace and the backup will be created automatically
  • Linking the shortcut to a different database enables the user to open PowerFactory several times (if there are enough licences).

Example for a PowerFactory.ini file:

 

[externalApplications]

pythonDir = C:\Users\xxx\AppData\Local\Continuum\anaconda3

pythonInterpreter = 1

 

[license]

container = XXX-XXXXXXXXX

server = localhost

 

[general]

language = en

backupDirectory = D:\path\folder\MyWorkspace.backup

workspaceDirectory = D:\path\folder\MyWorkspace

 

Back