Announcement

Collapse
No announcement yet.

Determine Max version with MAXscript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Determine Max version with MAXscript

    Hi everyone.

    I try to determine the max version via MAXScript.

    The only thing I found so far is the "maxOps.productAppID"-code which returns "#max" as application, but I need to determine wether it is Max 2008, 2009 or 2010.

    Didn´t succeed to fine the proper code in MAXScript-reference...

    Any help?

    Thanks and best regards.

    Sascha

  • #2
    try maxVersion(), it returns an array where the first value is the release number, being "10000" max 2008, "11000" max 2009 ...

    Regards

    Comment


    • #3
      local max_version = ((maxVersion())[1] / 1000) as string

      where 10=max2009 11=max2010, etc...
      Dave Buchhofer. // Vsaiwrk

      Comment


      • #4
        Delete folder with white space name

        Works fine, thanks.

        Now I try to delete a folder with white space name, e.g. "C:\a test\".

        This code works fine:

        Code:
        doscommand "rmdir \"C:\a test\""
        0 is returned, the folder is gone.

        ...but I have to build the commandstring via script, so this doesn´t work:

        Code:
        myPath = "C:\\a test\\"
        myString = "rmdir" + " \\" + "\"" + myPath + "\""
        doscommand myString
        161 is returned and the folder is still there...

        Any ideas?

        Thanks and best regards.

        Sascha

        Comment


        • #5
          you might try
          Code:
          myPath = "\"C:\\a test\\\""
          I don't remember if that does the job or not, I remember I've had to jump through hoops to get it to work right, I've resorted to writing a bat file through script and running that instead.
          Eric Boer
          Dev

          Comment


          • #6
            or you can do it the .net way
            Code:
            mypath = "c:\\a test"
            n_dir = (dotnetobject "System.IO.DirectoryInfo" mypath)
            n_dir.delete()

            Comment


            • #7
              Keep it simple

              No, I had to keep it more simple:

              Code:
              myPath = "c:\a test"
              myString = "rmdir" + " \"" + myPath + "\""
              rmdir myString
              Works fine.

              Thanks to Steve Curley on "The Area".

              Sascha

              Comment

              Working...
              X