Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Host Codesys in a WPF aplication rootFolder problem

tooextmar
2015-01-13
2015-01-13
  • tooextmar - 2015-01-13

    Hi!
    We are examining if itΒ΄s viable to host Codesys in a WPF application.
    One idea is to wrap Codesys in a Winforms userControl and then host it in WPF using the WindowsFormsHost element.
    All the references of the Automation framework point to the Automation framework installation in the usercontrol project.

    The first problem occurs when we try to refer to profiles from the componentmanager in the usercontrol. They are empty.
    It seems to relate to that the rootfolder automatically set in the Component manager points to the outputfolder in the usercontrol project.
    Is there anyway to set the rootfolder property on the componentmanager to point to the Codesys installation path?
    If not, is there any other way to make the Component manager to have the correct rootfolder configured?

     
  • tooextmar - 2015-01-13

    Found a solution
    There is a static method on the componentmanager which is called SetRootFolder("path")
    You have to set it before instantiating the componentmanager for the first time and directly on the static classs, not the singleton.
    This is however labeled as for internal use only but I canΒ΄t find any other way at the moment.

     

Log in to post a comment.