Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>3ds MaxNew to Visual Studio Code? Get it now.
3ds Max

3ds Max

JokerMartini

|
3 installs
| (1) | Free
Send MaxScript and Python code to Autodesk 3ds Max, with MaxScript language support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

3ds Max for VS Code

Send MaxScript and Python code from VS Code to Autodesk 3ds Max, with full MaxScript language support.

Features

  • Send File to 3ds Max — Execute the current MaxScript (.ms, .mcr, .mse, .mzp) or Python (.py) file directly in 3ds Max
  • Send Selection to 3ds Max — Execute selected code or the current line
  • Select 3ds Max Instance — Choose which running instance receives your code
  • MaxScript Syntax Highlighting — Full TextMate grammar for MaxScript
  • Code Snippets — 12 snippets for common MaxScript patterns
  • Language Configuration — Comment toggling, bracket matching, auto-closing pairs, and code folding

Requirements

  • Windows only (uses the Windows API to communicate with 3ds Max)
  • Autodesk 3ds Max must be running
  • The MAXScript Listener must be accessible in 3ds Max (open via MAXScript > MAXScript Listener or press F11)

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "3ds Max"
  4. Click Install

From .vsix File

  1. Download the .vsix from the Releases page
  2. In VS Code: Ctrl+Shift+P > "Extensions: Install from VSIX..."
  3. Select the downloaded file

From Source

git clone https://github.com/your-username/3dsmax-vscode.git
cd 3dsmax-vscode
npm install
npm run compile

Then press F5 in VS Code to launch the Extension Development Host with the extension loaded.

Usage

Keyboard Shortcuts

Shortcut Command Context
Shift+Enter Send File MaxScript or Python file
Alt+Shift+E Send Selection Any editor
Alt+Shift+I Select Instance Any context

Sending Code

  1. Open a MaxScript (.ms) or Python (.py) file in VS Code
  2. Press Shift+Enter to send the entire file, or select code and press Alt+Shift+E to send the selection
  3. If no 3ds Max instance is selected, you will be prompted to choose one automatically

Status Bar

The status bar at the bottom shows the current connection state:

  • 3ds Max: Not Connected — click to select an instance
  • 3ds Max: 2025 — connected to 3ds Max 2025 (shows the version year)

How It Works

The extension communicates with 3ds Max using the Windows API:

  1. Finds running 3ds Max windows via EnumWindows
  2. Locates the MAXScript mini listener window (class MXS_Scintilla)
  3. Sends commands via WM_SETTEXT and simulates pressing Enter via WM_CHAR

For MaxScript files, it sends: fileIn @"C:\path\to\file.ms" For Python files, it sends: python.executeFile @"C:\path\to\file.py"

Selections are written to a temp file first, then executed via the same mechanism.

Settings

Setting Default Description
3dsmax-vscode.extendSelectionToFullLines true Extend selection to cover full lines before sending
3dsmax-vscode.wrapSelectionInParentheses true Wrap MaxScript selection in () for local variable scope

Snippets

Trigger Description
fn Function definition (short form)
function Function definition (long form)
ifdo If-Do block
ite If-Then-Else block
struct Struct definition
structgui Struct with GUI rollout
structmod Struct module pattern
rollout Rollout dialog
group Rollout group
on Event handler
for For loop
forcollect For-collect expression

Troubleshooting

"No running 3ds Max instances found"

  • Make sure 3ds Max is running
  • The window title must contain "Autodesk 3ds Max"

"MAXScript Listener not found"

  • Open the MAXScript Listener in 3ds Max: MAXScript > MAXScript Listener or press F11
  • Make sure the mini macro recorder is visible (bottom-left status area of the 3ds Max window)

Code doesn't execute

  • Click in the mini listener in 3ds Max to make sure it's active, then try sending again
  • Check the MAXScript Listener output for error messages

Shift+Enter doesn't send the file

  • The keybinding only activates when the file language is maxscript or python
  • For .ms files, the language should be auto-detected. If not, click the language indicator in the VS Code status bar and select "MaxScript"

Development

This section covers how to work on the extension locally, build it, and publish it.

Prerequisites

  • Node.js (v18 or later)
  • VS Code
  • Git

Local Setup

git clone https://github.com/your-username/3dsmax-vscode.git
cd 3dsmax-vscode
npm install

Running Locally (Testing)

  1. Open the project folder in VS Code
  2. Press F5 — this compiles the extension and launches a new VS Code window (Extension Development Host) with the extension loaded
  3. In the Extension Development Host, open a .ms or .py file
  4. Test the commands via the keyboard shortcuts or Command Palette (Ctrl+Shift+P > "3ds Max:")

Watch mode for iterative development — auto-recompiles on file changes:

npm run watch

Then press F5. Any changes you make to TypeScript files are recompiled automatically. Reload the Extension Development Host (Ctrl+R) to pick up changes.

Build Commands

Command Description
npm run compile Type-check and build once
npm run watch Watch mode (auto-rebuild on changes)
npm run package Production build (minified)

Project Structure

3dsmax-vscode/
├── src/
│   ├── extension.ts          # Entry point — registers commands
│   ├── winapi.ts             # Windows API wrapper (koffi + user32.dll)
│   ├── maxConnection.ts      # Connection state and status bar
│   └── commands.ts           # sendFile, sendSelection logic
├── syntaxes/
│   └── maxscript.tmLanguage.json   # MaxScript syntax grammar
├── snippets/
│   └── maxscript.json        # MaxScript code snippets
├── language-configuration.json     # Comment, bracket, folding rules
├── package.json              # Extension manifest
├── tsconfig.json             # TypeScript config
└── esbuild.js                # Bundler config

Publishing

One-Time Setup

  1. Create an Azure DevOps organization at https://dev.azure.com (free)

  2. Create a Personal Access Token (PAT):

    • Go to your Azure DevOps organization
    • Click your profile icon > Personal Access Tokens > New Token
    • Name: VS Code Marketplace
    • Organization: All accessible organizations
    • Scopes: check Marketplace > Manage
    • Click Create and copy the token (you won't see it again)
  3. Create a publisher at https://marketplace.visualstudio.com/manage:

    • Choose a unique publisher ID (e.g., your GitHub username)
    • Set a display name
  4. Update package.json: replace "publisher": "your-publisher-id" with your actual publisher ID

  5. Login with vsce:

    npx @vscode/vsce login <your-publisher-id>
    # Paste your PAT when prompted
    
  6. You can upload it manually at https://marketplace.visualstudio.com/manage by clicking your publisher > New Extension > VS Code > drag/drop the .vsix file.

Building a .vsix Package

npx @vscode/vsce package --target win32-x64

This creates a .vsix file you can share directly or install via "Install from VSIX..." in VS Code.

The --target win32-x64 flag is required because the extension includes a native module (koffi) with platform-specific binaries.

Publishing to the Marketplace

# Publish for Windows x64
npx @vscode/vsce publish --target win32-x64

# Or publish for multiple Windows architectures
npx @vscode/vsce publish --target win32-x64 win32-arm64

Version Bumping

npx @vscode/vsce publish patch   # 0.1.0 → 0.1.1
npx @vscode/vsce publish minor   # 0.1.0 → 0.2.0
npx @vscode/vsce publish major   # 0.1.0 → 1.0.0

Sharing via GitHub (Without Marketplace)

If you just want to share the extension via GitHub without publishing to the marketplace:

  1. Push your code to GitHub:

    git init
    git add .
    git commit -m "Initial commit: 3dsmax-vscode extension"
    git remote add origin https://github.com/your-username/3dsmax-vscode.git
    git branch -M main
    git push -u origin main
    
  2. Build a .vsix package:

    npx @vscode/vsce package --target win32-x64
    
  3. Create a GitHub Release and attach the .vsix file

  4. Others can install it via: Ctrl+Shift+P > "Extensions: Install from VSIX..."


Credits

  • MaxScript syntax grammar based on sublime3dsmax by Christoph Buelter and Rogier van Etten
  • Communication approach inspired by VSCode-SendTo3dsMax
  • Uses koffi for Windows API integration

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft