How to get WB version?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 450
100 Answers 250 Likes 100 Comments First Anniversary
✭✭✭✭
edited December 2022 in General Language Questions

How to get WB version?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 450
    100 Answers 250 Likes 100 Comments First Anniversary
    ✭✭✭✭
    Answer ✓
    GetFrameworkVersion()
    '20.1'
    

    Only from 2021R1:

    GetFrameworkVersion()
    
    '21.1'
    
    GetPersistedExternalVersionString()
    
    '2021 R1'
    
    GetPersistedProjectVersion()
    
    '211'
    
    
  • M
    M Member, Employee Posts: 236
    50 Answers 100 Comments 100 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    Some things are easier in Mechanical, at least in 2022R2:

    version
    

    enter image description here

  • M
    M Member, Employee Posts: 236
    50 Answers 100 Comments 100 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    In Mechanical you can try this (2022r2 at least):

    import ansys

    import Ansys.Utilities

    version = Ansys.Utilities.ApplicationConfiguration.DefaultConfiguration.VersionInfo.VersionString