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.
Buckets & Derivatives View
The Buckets & Derivatives view allows you to browse Forge Data Management OSS (object simple storage) content, create buckets, upload/download files, translate them using Forge Model Derivative service, and access the resulting derivatives. All derivatives are listed as children of their corresponding objects in the tree. If there are no derivatives yet, or if there's been an issue with the translation, 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 as SVF 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>
Additional output formats are also supported, for example, F2D, OTG, or glTF.
Hubs & Derivatives View
Experimental feature similar to the Buckets & Derivatives view, but using a 3-legged authentication instead, allowing the user to browse their A360 hubs, BIM360 hubs, etc. In order for this view to be available, the user must first log into their Forge application with their Autodesk account. This can be done either by clicking the "Forge Auth" button in the bottom status bar, or by using the
forge.login command. The extension will spin up a temporary web server on a preconfigured port (8123 by default), providing additional information about the login process, and waiting for a callback from the Autodesk servers.
The Webhooks view can be used to browse and configure the Forge Webhooks service.
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 Launch 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, use the
Developer: Open Webview Developer Tools and the
Developer: Reload Window commands.