Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Overview

FactoryStudio Upgrade: Technical documentation for upgrading legacy projects to FrameworX version 10.

Version 10 represents a significant advancement compared to previous systems, simplifying major advancement with simplified concepts and interfaces while adopting new technologies. As a result, it is not possible to ensure 100% compatibility with legacy projects. However, most legacy projects will run smoothly immediately after the upgrade process.This document explains the upgrade process, potential issues, and their solutionsWhile most legacy projects upgrade smoothly, 100% compatibility cannot be guaranteed. All upgraded projects require validation in a lab environment before production deployment.

On this page:

Table of Contents
maxLevel

3

2
minLevel2
indent10px
excludeSteps
stylenone


Upgrade Requirements

Version Compatibility

Source VersionDirect UpgradeProcess
9.1, 9.2YesDirect upgrade to v10
Earlier than 9.1NoFirst upgrade to 9.1/9.2, then to v10

Important Notice

All projects must

Upgrading to v10: Important Notice

The new Version 10 is a major update, introducing significant improvements and new technologies to enhance performance, security, and future platform support. Due to the extent of these changes, upgrading existing projects to V10 may require some manual adjustments to ensure compatibility.

Additionally, all projects should

be revalidated in a lab environment before field deployment

in the field

. This

revalidation

step is essential to confirm

that each component functions optimally

optimal functionality in the new version

, and we cannot guarantee a smooth upgrade if you attempt to update without lab testing

.


Upgrade

Command

In order to upgrade a legacy project, you just need to put the <project>.tProj file in the folder mapped to the Solutions Manager, so that project will be visible on the Solutions List (press Refresh after changing files in the folders).

Only projects from versions 9.1 and 9.2 can be upgraded directly. For older project files, first use the 9.1 or 9.2 product to upgrade to that version, then bring it to the final step on version 10.

When a file with the extension .tProj is found, it shows on the Solution List with the prefix "Project." When a legacy project is selected, the "Upgrade Version" command button is enabled.

When Upgrading:

  • The previous project file remains intact; the system uses a copy in the upgrade process.
  • A new solution (with the .dbSln extension) is created with the same name as the upgraded project (only the extensions of the file will be distinct).
  • After the upgrade, only the new solution (.dbSln) will show on the Solution List (the legacy project file is kept hidden from the list).

The first time you open an imported solution, the Designer will prompt you to do a Build Command (Runtime → Build and Publish).

Manual Upgrade Corrections

Most of the replacement of new names and properties is executed automatically, but there are a few areas where manual intervention is necessary.

RuntimeUsers Database, TableName

The pre-defined value for the table name for RuntimeUsers in version 9.2 or older was: EditSecurityUsers_Runtime. This name has been replaced by SecurityRuntimeUsers.

The Upgrade tools already attempt to find and correct that name in Scripts and Database connections automatically, but the DATABASE itself you will be connecting to cannot be changed automatically. Therefore, before commissioning version 10 to production, you need to rename the table in the target database from EditSecurityUsers_Runtime to SecurityRuntimeUsers.

Advanced Toolkit applications

Some advanced applications using the product toolkits and the API for programmatic engineering (EngWrapper API) are likely to lack compatibility due to the renaming of internal data structures and tables. Contact support if upgrading such applications.

Themes

The Themes features from version 9.2 allowed extensive customization, but managing them could be quite complex.

The Themes features in version 10 have been expanded, with more built-in themes and an extremely simplified interface. However, the migration cannot be fully automated. Solutions need to be reviewed for the colors of screens and objects that were mapped to theme resources.

Process

Steps

  1. Place <project>.tproj file in Solutions Manager folder
  2. Press Refresh in Solution List
  3. Legacy project appears with "Project." prefix
  4. Select project and click "Upgrade Version"
  5. System creates .dbsln file with same name
  6. Original .tproj file remains intact
  7. Designer prompts for Build on first opening

File Handling

ActionResult
Original filePreserved unchanged
New solutionCreated as .dbsln
Solution ListShows only new .dbsln
Legacy fileHidden from list

Manual Corrections Required

RuntimeUsers Database

Issue: Table name change from EditSecurityUsers_Runtime to SecurityRuntimeUsers

Required Action:

  1. Rename table in target database
  2. Update from EditSecurityUsers_Runtime
  3. Change to SecurityRuntimeUsers
  4. Complete before production deployment

Advanced Toolkit Applications

Applications using programmatic engineering (EngWrapper API) may lack compatibility due to internal structure changes. Contact support for upgrade assistance.

Themes

VersionApproachMigration
9.2Complex customizationManual review required
10Simplified interfaceCannot fully automate

Review screens and objects mapped to theme resources after upgrade.


Asynchronous Methods

Version 10 uses async programming patterns for improved performance and HTML5 compatibility.

Required Changes

Server Class Calls from Client

C# Example:

csharp

public async Task DisplayOpening()
{
    await 

Scripts Asynchronous Methods

Version 10 uses a more modern and efficient programming pattern called asynchronous methods. This improves performance on displays and is one of the technologies that enables most Windows WPF displays to run on web HTML5 with no modifications.

When creating new solutions, this is done automatically for you. However, legacy displays with heavy CodeBehind scripts may require modification of methods to use the async operator.

For more information on Async programming: https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/

Calling Server Classes from Displays and Client Classes

 Now when calling Script Class Server method from Client scripts (Script Class Client or Display CodeBehind) should add "await" (C#) "Await" (VB.NET) for the HTML5 to work successfully.

C#:

public async Task DisplayOpening() { await
@Script.Class.ServerMain.Method1();
}

VB.NET Example:

vbnet

Public Async Function DisplayOpening() As Task
    Await @Script.Class.ServerMain.Method1()
End Function

Correction of Logon() on CodeBehind

The method Logon() should be replaced by LogonAsync(), as well other synchronous methods shall be modified to their async versions. Here is the modification of the Logon() method, as it was very commonly used in the projects.

Code Block

LogOn Method Update

Replace LogOn() with LogOnAsync():

JavaScript:

javascript

languagejstitleJavaScript

this.DialogOnOK = async function()
{
 
   
 
 var result = await 
@Client
@Client.LogOnAsync("user1", "pass1");
 
   
 
 return true;
};
Code Block

C#:

csharp

languagec#titleC#

public async 
Task<bool>
Task<bool> DialogOnOK()
{
 
   
 
 var result = await @Client.LogOnAsync("user1", "pass1");
 
   
 
 return true;
}
code
languagevbtitle

VB.NET:

vbnet

Public Async Function DialogOnOK() As Task(Of Boolean)
 
   
 
 Dim result As Integer = Await @Client.LogOnAsync("user1", "pass1")
 
   
 
 Return True
End Function

Calling Async Methods

One reason the update of the code to use async methods is not fully automated is that when a method is modified to become async, other methods that call it need to be updated as well. These calling methods must also be updated in their signatures and return values to accommodate the new async method. There are different ways to implement this, typically using await or Result operators. It would not be feasible for the upgrade tool to automatically and safely modify all dependencies and application logic to use the method asynchronously.

Here ia complete example, on how a Code Behind of a display was in earlier versions, with synchronous call, and the modified code using async calls.

Code Block
languagec#
titleLegacy CodeBehind
Public Sub DisplayOpening() ' Add your code here End Sub Public Sub DisplayIsOpen() ' Add your code here End Sub Public Sub DisplayClosing() ' Add your code here End Sub 'This method is only called on Dialog displays Public Function DialogOnOK() As Boolean Dim log As eSecurityErrors log

Complete CodeBehind Example

Legacy Code (Synchronous):

vbnet

Public Function DialogOnOK() As Boolean
    Dim log As eSecurityErrors
    log = DirectCast(@Client.LogOn(@Client.InputUserName, @Client.InputPassword), eSecurityErrors)
    If log = eSecurityErrors.OK Then
@Display.LogOn.Close() Return True

End If Dim msg As
 
String
 
=
 
@Client.Locale("Could
 
not
 
logon")
 
+
 
" (" + @Client.Locale(log.ToString()) + ")" MessageBox.Show(msg) Return False End Function Public Sub ExecuteLogOff(ByVal sender As Object, ByVal e As MouseButtonEventArgs) @Client.LogOnGuest() @Display.LogOn.Close() End Sub Public Sub MouseLeftButtonOk(ByVal sender As Object, ByVal e As System.Windows.Input.InputEventArgs) DialogOnOK() End Sub
 @Display.LogOn.Close()
        Return True
    End If
    Return False
End Function

Updated Code (Async):

vbnet

Public 
 

The previous code in version 10 will issue warnings, not errors, as it can still be used in displays that are WPF (Windows) only.

The warnings are issued because the code is no longer acceptable for pages targeting Web HTML5. Therefore, it cannot be used in portable pages (Web and Windows ready), which are the preferred option moving forward.

It’s important to emphasize that using async also benefits WPF-Windows applications by making UI interactions more responsive.

The upgrade tool will only attempt to automatically update the LogOn page if it was kept as provided in the templates. The following code shows the changes needed to manually correct the LogOnPage if necessary, and the patterns of using async and await can be applied to other pages that require changes.

Code Block
languagevb
titleVB.NET Code Behind using async
Public Sub DisplayIsOpen() End Sub Public Sub DisplayClosing() End Sub Public
Async Function DialogOnOK() As Task(Of Boolean)
    Dim log As eSecurityErrors
    log = DirectCast(Await @Client.LogOnAsync(@Client.InputUserName, @Client.InputPassword), eSecurityErrors)
If log =
 
eSecurityErrors.OK
 
Then @Display.LogOn.Close() Return
 
True End
 If
Dim msg As
 
String = @Client.Locale("Could not logon") + " (" + @Client.Locale(
log
.ToString()) Code Block
languagec#
titleModified CodeBehind to use async (C#)
public void DisplayIsOpen() { } public void DisplayClosing() { } public async Task<bool> DialogOnOK() { eSecurityErrors log; log = (eSecurityErrors) await @Client.LogOnAsync(@Client.InputUserName, @Client.InputPassword); if (log
 
+ ")" MessageBox.Show(msg) Return False End Function Public Async Function ExecuteLogOff(ByVal sender As Object, ByVal e As MouseButtonEventArgs) As Task Await @Client.LogOnGuestAsync() @Display.LogOn.Close() End Function Public Async Function MouseLeftButtonOk(ByVal sender As Object, ByVal e As System.Windows.Input.InputEventArgs) As Task Await DialogOnOK() End Function
=
=
 eSecurityErrors.OK
)
 
{ @Display.LogOn.Close(); return true; } string msg = @Client.Locale("Could not logon") + " (" + @Client.Locale(log.ToString()) + ")"; MessageBox.Show(msg); return false; } public async Task ExecuteLogOff(object sender, MouseButtonEventArgs e) { await @Client.LogOnGuestAsync(); @Display.LogOn.Close(); } public async Task MouseLeftButtonOk(object sender, System.Windows.Input.InputEventArgs e) { // Add your code here await DialogOnOK(); }

A suggestion to change certain methods to async will appear during the build process in Runtime / Build and Publish.

Info

For methods that return TRef, go to Asynchronous Programming documentation.

For methods that return a value, use the syntax public async Task<T> MethodName where T is the return type.

Symbol Mnemonic

As of version 9.2, all mnemonics in symbols are required to have a default value. This configuration can be set either prior to the upgrade or after upgrading to version 10. Objects should follow the standard format shown below where Expression represents how it was defined in previous versions, while Label Text reflects the format in version 10. These names correspond to the property names. The example shown refers to the TTextBox object within the TextIO property.

Section
Column
width20%

Wrong (error)

Expression: #HourOfDay:

Label Text: {#HourOfDay:}

Column

Correct (tick)

Expression: #HourOfDay:""

Label Text: {#HourOfDay:""}

Popup position

The procedure for positioning popups on the display has changed. Use the 'Left' and 'Top' settings under Drawing Properties

Full path: Drawing / Display / <DisplayName> / Drawing Properties / Display Settings: "Left and Top"

Info

For more information, see Display Settings.

Layout

In previous versions, layouts relied on docking and alignment. The layout system has since changed—please refer to the layout section for details on the new approach: Displays Layouts

Projects that previously used multiple docked windows (e.g., docking to the top to create multi-level menus) can no longer be set up this way. In the new version, all menu levels must now be included within a single header window.

To modify specific submenu sections within the header, use the ChildDisplay control to create and manage submenu levels. The number of ChildDisplay elements should match the number of desired levels. Alternatively, you can create multiple header displays with the required variations. While this approach is more labor-intensive, it may be suitable when there are only a few combinations.

Deprecated Features

List of Deprecated features:

  • Synchronous calls on SQL Queries and various other methods. The system will still compile, but a warning will be issued.
  • Custom Theme Editing for specific controls is no longer support. We also no longer allow different solutions to have distinct IDs for the theme resources, as those are now standard. 
  • The syntax <TagProvider>.("Topic Path") is no longer supported. You now need to map the TagProvider to the AssetTree.
  • Generation and visualization for XPS documents is no longer supported.
Then
        @Display.LogOn.Close()
        Return True
    End If
    Return False
End Function

Additional Corrections

Symbol Mnemonic

All mnemonics require default values:

VersionFormatExample
Legacy#HourOfDay:Missing default
v10#HourOfDay:""Includes default

Popup Position

Use Drawing Properties for positioning:

  • Path: Drawing → Display → [DisplayName] → Drawing Properties
  • Settings: Left and Top

Layout System

FeatureLegacyv10
MethodDocking/alignmentNew layout system
Multi-level menusMultiple docked windowsSingle header window
SubmenusSeparate windowsChildDisplay controls

Deprecated Features

FeatureStatusAlternative
Synchronous SQL callsWarning issuedUse async methods
Custom theme editingNot supportedUse standard themes
<TagProvider>.("Topic Path") syntaxRemovedMap to AssetTree
XPS documentsNot supportedUse PDF or other formats

Validation Checklist

Pre-Production Testing

  • All displays open correctly
  • Scripts execute without errors
  • Database connections work
  • Alarms function properly
  • Historical data logs correctly
  • Client connections stable
  • Performance acceptable

Common Issues

IssueSolution
Display errorsUpdate async methods in CodeBehind
Database failuresRename RuntimeUsers table
Theme problemsReview color mappings
Layout issuesRedesign using new system

Best Practices Checklist

  •  Backup original project before upgrade
  •  Test thoroughly in lab environment
  •  Document all manual changes made
  •  Verify async methods in all scripts
  •  Review deprecated features for alternatives
  •  Plan theme and layout updates
  •  Validate all functionality before production

See Also



In this section...

Page Tree
root@parent
spaces93DRAF

In this section:

Page Tree
rootV10:@parent
spacesV10