用到了 GetFileVersion 相关文档在此:http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=files/GUID-BA196B48-8ECA-4E0C-AE2E-F7EFAAF39844.htm,topicNumber=d30e712756
fn max_Version =
(
max_V = GetFileVersion (getDir #maxRoot + "\\3dsmax.exe") -- 获取当前max版本号
YY_v = substring max_V -- 返回字符串中从第一个到第二个字符
case of
(
(YY_v == ""): (YY_max_V = "3dsmax2008")
(YY_v == ""): (YY_max_V = "3dsmax2009")
(YY_v == ""): (YY_max_V = "3dsmax2010")
(YY_v == ""): (YY_max_V = "3dsmax2011")
(YY_v == ""): (YY_max_V = "3dsmax2012")
(YY_v == ""): (YY_max_V = "3dsmax2013")
(YY_v == ""): (YY_max_V = "3dsmax2014")
(YY_v == ""): (YY_max_V = "3dsmax2015")
)
YY_max_V
)