How to get WB version?

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 416
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited December 2022 in General Language Questions

How to get WB version?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 416
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓
    Options
    GetFrameworkVersion()
    '20.1'
    

    Only from 2021R1:

    GetFrameworkVersion()
    
    '21.1'
    
    GetPersistedExternalVersionString()
    
    '2021 R1'
    
    GetPersistedProjectVersion()
    
    '211'
    
    
  • M
    M Member, Employee Posts: 230
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

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

    version
    

    enter image description here

  • M
    M Member, Employee Posts: 230
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

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

    import ansys

    import Ansys.Utilities

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