Skip to content

Visual Studio Code

Jeff Hanna edited this page Jun 16, 2019 · 11 revisions

Configuring Visual Studio Code to execute scripts inside of 3ds Max can be achieved by creating a a project specific task.

Tasks can only be configured in a workspace folder. With a workspace loaded active the Tasks\Configure tasks... menu command and then click on the Create tasks.json file from template option that appears. From the next list of selections click on the Others - Example to run an external command option. In the tasks.json file that is created replace the sample JSON data with the following - ensuring that the path in the "command" entry is either an absolute or relative path to where MXSPyCOM.exe is located.

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
       {
          "label": "Execute Script in 3ds Max",
          "type": "shell",
          "command": "C:\\Program Files\\MXSPyCOM\\MXSPyCOM.exe",
          "args": [
             "-s",
             "${file}"
          ],
          "presentation": {
             "echo": false,
             "reveal": "never",
             "focus": false,
             "panel": "dedicated"
          },
          "problemMatcher": [],
       }
    ]
}

The command is now available from the Tasks\Run Task menu command.

Clone this wiki locally