How to determine user's software version by TCL
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.
Answers
-
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
HM doesn't have this.
0 -
Adriano A. Koga_21884 said:
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
HM doesn't have this.
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.
0 -
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
}0