Skip to main content

Command: Preferences

Function: The command opens the global preference editor for the current user and displays the Preferences UserGlobal.prefs.json tab. This tab contains the settings for the UserGlobal configuration level. A button can be used to toggle between the configuration levels of UserGlobal (Preferences UserGlobal.prefs.json tab) and Global (Global.prefs.json tab). On the two tabs, the settings (preferences) for the web application, the text editor, the ladder editor, the library repositories and the extensions of CODESYS 4 are displayed and configured for the respective configuration level.

Call:

  • Menu – Preferences command

  • Command Center

  • Shortcut: Ctrl+,

Tab: Preferences Global.prefs.json

Configuration level: Global

Global settings for all users

Note: The settings of the Global configuration level are write-protected. They can only be edited if CODESYS 4 has been started as administrator.

By default, these settings apply unless they are overridden by custom settings. Whenever a global setting has been overridden by a custom setting, this will be indicated displayed on this tab near the respective setting.

Tab: Preferences UserGlobal.prefs.json

Configuration level: UserGlobal

Custom settings

Important

Custom settings override global settings.

search64px.svg

Search field for settings

Clicking the icon will open the search field.

While the text is being input, the displayed settings will be narrowed down to the matching results.

_c4_icon_scope_userglobal.png

Toggles the displayed settings between the following configuration levels:

  • Global configuration level: The Preferences Global.prefs.json tab is selected.

  • UserGlobal configuration level: The Preferences UserGlobal.prefs.json tab is selected.

_c4_icon_reset_preferences.png

Reset All Preferences: All settings will be reset to their default values.

Left area of the editor

Table of contents

Structured display of settings for the configuration areas Web Application, Library Repositories, Text Editor, and the available extensions.

When an entry is double-clicked in the table of contents, the editor will jump to the corresponding setting in the area on the right side.

Right area of the editor

Displaying and editing the settings

In this area of the editor, you can edit all settings.

When a setting has been explicitly changed by the user, the corresponding JSON file will be automatically updated immediately. A vertical colored highlight on the left of the setting indicates that the default setting has been changed. When the Reset Preferences gear command is executed, the colored highlight will be removed.

Table 5. Gear menu commands of the settings

When the mouse is moved over a setting, a small gear icon will be shown on the left side. When the gear icon is clicked, the following commands will be displayed:

Copy Preference Id

Copies the ID of the setting to the clipboard

Example: The LadderEditor: Show Network Title preference is used to copy LadderEditor.prefs/generalEditing/showNetworkTitle.

Copy Preference as Json

Copies the entire preference (the key and value of the setting) in JSON format to the clipboard

Example: The active LadderEditor: Show Network Title preference is used to copy "LadderEditor.prefs/generalEditing/showNetworkTitle":true.

Reset Preference

Resets the setting to the default value

The vertical colored highlight on the left of the setting is removed.

Edit in File

Opens the associated JSON file for direct editing



CODESYS 4 stores the settings in the <configuration area>.prefs.json files on the file system. For the Global configuration level, the storage directory is C:\ProgramData\CODESYS-4. For the UserGlobal configuration level, the storage directory is C:\Users\<user name>\AppData\Roaming\CODESYS-4.

Configuration areas

  • Ladder Editor: Settings for the display of the ladder editor

  • Library Repositories: Settings where CODESYS 4 searches for managed libraries. In most cases, the localRepositories setting is sufficient. For the full, extended configuration, the storages and c4LibraryRepositories keys are also available, and these are added to the LibraryRepositories.prefs.json file.

    For more information about library repositories, see the following: Library Repository

  • Text Editor: Settings for the appearance and behavior of the text editor

  • Web Application: Settings for language and theme of the web application