Create a function block in a specific folder

2019-04-10
2019-04-12
  • Victor Kulikov - 2019-04-10

    Dear forum experts!

    How can I create a function block in a specific folder?

    Not working example:

    proj = project.primary
    found = proj.find("Application", true)
    app = found[0]
    myfolder = app.create_folder("Myfolder")
    myfolder.create_pou("mypou")
    

    Regards, Victor

     
  • mkeller - 2019-04-11

    Hi.

    Your code had one syntax error and two Scripting error.

    Here is a working example:

    proj = projects.primary
    found = proj.find("Application", True)
    app = found[0]
    app.create_folder("Myfolder")
    found = app.find("Myfolder")
    myfolder = found[0]
    myfolder.create_pou("mypou")
    

    BR
    Martin

     
  • Victor Kulikov - 2019-04-12

    Hi, Martin!

    Many thanks for your help!

    Regards,
    Victor

     

Log in to post a comment.