Forge & 3ds Max

By - - 3ds Max

At Forge DevCon we announced the private beta of the Design Automation API for Revit, Inventor, 3ds Max and AutoCAD. Previously this was only available for AutoCAD so in preparation for this to become available for 3ds Max also, it would make sense to dive a bit into Forge. As initially this isn't going to be very 3ds Max focussed (apart from this post) the series of posts will be on AKN and I'll add links to the end of this post.

A couple relevant presentations from Forge DevCon:


So what is Forge? Forge enables companies to leverage design and engineering data to develop custom software applications and connected workflows for manufacturing, media/entertainment, architecture, engineering, and construction. For more information see Autodesk Forge


Prework for this series: as I'll be using python from within 3ds Max to use Forge we need to install the requests python module.

  • This is based on Python extension libraries from the 3ds Max online help
  • Download the file https://bootstrap.pypa.io/get-pip.py to your system (for more informatiopn on pip)
  • Start a command shell, make sure to rightclick on cmd.exe and run it as Administrator
  • Go to the 3ds Max install directory: cd "\Program Files\Autodesk\3ds Max 2018"
  • Run the following command: 3dsmaxpy.exe d:\d\forge\get-pip.py (adjust the path to where you save get-pip.py)
  • You should see something like this:
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting setuptools
Using cached setuptools-38.2.5-py2.py3-none-any.whl
Collecting wheel
Using cached wheel-0.30.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-9.0.1 setuptools-38.2.5 wheel-0.30.0

  • (If you get an exception with an Access Denied error you're probably not running a Admin cmd shell)
  • Change to the python scripts folder: cd python\Scripts
  • run the following command: pip install --no-cache-dir requests
  • You should see something like:
C:\Program Files\Autodesk\3ds Max 2018\python\Scripts>pip install --no-cache-dir requests
Collecting requests
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |################################| 92kB 2.1MB/s
Collecting idna<2.7,>=2.5 (from requests)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |################################| 61kB 3.4MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |################################| 133kB 2.5MB/s
Collecting certifi>=2017.4.17 (from requests)
Downloading certifi-2017.11.5-py2.py3-none-any.whl (330kB)
100% |################################| 337kB 3.0MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |################################| 143kB 3.0MB/s
Installing collected packages: idna, urllib3, certifi, chardet, requests
Successfully installed certifi-2017.11.5 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22

That's it, now you can import the requests module from python in 3ds Max.
>>> import requests
>>> help(requests)
Help on package requests:

NAME
requests

FILE
c:\program files\autodesk\3ds max 2018\python\lib\site-packages\requests\__init__.py

DESCRIPTION
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human
beings..
...


List of posts:

Posted By
Published In
Tags
  • 3ds Max
  • Film & VFX
  • Games
  • Design Visualization
0 Comments
To post a comment please login or register