Normally, a problem type requires a minimum version of GiD to run. Because the problem type can be distributed or sold separately from GiD, it is important to check the GiD version before continuing with the execution of the problem type. GiD offers a function, GidUtils::VersionCmp, which compares the version of the GiD currently being run with a given version.

GidUtils::VersionCmp { Version }

This returns a negative integer if Version is greater than the currently executed GiD version; zero if the two versions are identical; and a positive integer if Version is less than the GiD version.

Note: This function will always return the value -1 if the GiD version is previous to 6.1.5.


proc InitGIDProject { dir } {

set VersionRequired "10.0"

if {[GidUtils::VersionCmp $VersionRequired] < 0 } {

WarnWin [= "This interface requires GiD %s or later" $VersionRequired]