🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to determine user's software version by TCL

User: "James Seedorf"
Altair Community Member
Updated by James Seedorf

Across our team some people use Hypermesh/Hyperworks Desktop and some use plain HyperMesh, one of our .TCL scripts need to vary depending on which software is being used.  I can't seem to find any queries that return a useful difference I could compare against.

 

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Adriano_Koga"
    Altair Employee
    Updated by Adriano_Koga

    HW or HWDesktop has a bigger list of APIs supported such as the 'hwi' class.

    So if you run 'hwi ListMethods' in HWDesktop, you will get this as return.

    Not the fancier way, but you could use this to identify if it is HMDesktop or Standalone HM.

     

    HWDesktop

    image

    HM doesn't have this.

    image

    User: "James Seedorf"
    Altair Community Member
    OP
    Updated by James Seedorf

    HW or HWDesktop has a bigger list of APIs supported such as the 'hwi' class.

    So if you run 'hwi ListMethods' in HWDesktop, you will get this as return.

    Not the fancier way, but you could use this to identify if it is HMDesktop or Standalone HM.

     

    HWDesktop

    image

    HM doesn't have this.

    image

    Thanks, this is what I ended up doing.  I had to use Catch to catch the error that comes up if you try to run a desktop command in hypermesh and I could then create my if statement based on that catch. I'm not a huge fan of causing errors on purpose in these tools, but it works.

    User: "tdepa"
    Altair Community Member
    Updated by tdepa

    How about something like this? We do this once then check the variable for the rest of the scripts run in the session.

    if { [info command hwi] == "hwi" } {
        puts "Running in HyperWorks Desktop."
        set hwDesktop true
    }