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

Changing Version number (see get_project_info)

MaGu
2015-12-01
2015-12-01
  • MaGu - 2015-12-01

    Hey, is it possible to change Version Numbers seen in Project Information.
    For example creating a branch (new Major Version Number,... needed). Thanks, MaGu

     
  • mkeller - 2015-12-01

    Hi MaGu.

    Use the method "get_project_info()" to get the project info and get an System.Version instance from the property "version". If the object is "None" there is no version stored. Create a new instance of Version with the required values.

    proj = projects.primary
    info = proj.get_project_info()
    version = info.version
    if version == None:
    Β  Β  info.version = Version(10, 0, 0, 0) # Create new version
    else:
    Β  Β  info.version = Version(10, version.Minor, version.Build, version.Revision)
    

    BR
    Martin

     

Log in to post a comment.