Visual Studio Code extension for accessing Autodesk Forge services and content.
While in Visual Studio Code:
- Switch to the Extensions sidebar (
X on macOS or
X on Windows)
- Search for the Autodesk Forge Tools extension and install it
- Open User Settings (
, on macOS or
, on Windows), and search for forge env
- Note: switch to User or Workspace tab depending on whether you want to persist the settings globally (for all instances of vscode) or locally (for a specific workspace/folder)
- In the Autodesk > Forge: Environments section, click Edit in settings.json and define one or more environments as explained in the Extension Settings section below
- Switch to the new Forge sidebar and start browsing!
This extension contributes the following settings:
autodesk.forge.environments: array of objects representing different Forge environments; objects contain the following properties:
title - unique name of the environment (will be shown in status bar and when switching to other environments)
clientId - Forge client ID
clientSecret - Forge client secret
region - data region for storing Forge content (can be
US by default)
autodesk.forge.viewer.extensions: array of viewer extensions
Autodesk.DocumentBrowser) to be used when previewing derivatives
Here's an example of an environment list:
If you have configured multiple Forge environments, you can switch between them via status bar,
or using the
forge.switchEnvironment command. The extension will always initialize itself
based on the first environment in the list.
Note: if you have configured the extension both in the User scope and in the Workspace scope,
the extension will present the list of environments from the Workspace scope as it has higher precedence.
Data & Derivatives View
The Data & Derivatives view allows you to browse Forge Data Management content, create buckets, upload/download objects, translate objects using Forge Model Derivative service, and access the resulting derivatives. All derivatives are listed as children of the corresponding object in the tree. If there are no derivatives yet, or if there's been a translation issue, the tree view will provide additional information.
For objects that have already been translated using the Model Derivative service, you can use a command (or a context menu item) called
Download Object Derivatives which will download the SVF file (proprietary format used for viewing 3D content in Forge Viewer) and all its dependencies into a folder you pick,
similarly to the functionality provided by https://extract.autodesk.io. All the content will be stored using the following subfolder structure:
<additional files and subfolders>
<additional files and subfolders>
<files shared by all viewables>
Design Automation View
The Design Automation can be used for browsing Forge Design Automation entities such as app bundles and activities. It also provides a context menu that can be used to view additinal details of individual bundles or activities.
- clone the repository
- install and setup dependencies:
- open the project in vscode and launch the Run Extension task; new vscode window will open
- make sure you have at least one set of Forge credentials configured (see Getting Started and Extension Settings)
- click on the Forge icon in the sidebar and start browsing
When debugging a webview inside vscode, you can open Chrome Dev Tools for it
using the standard shortcut (
I on macOS,
I on Windows)