Skip to content

This sample is a revision of the [Learn Forge](http://learnforge.autodesk.io) node.js tutorials demonstrating how to use hypermodeling ext in Forge Viewer.

License

Notifications You must be signed in to change notification settings

VinithKumarSpritle/forge-viewer-hypermodeling-revit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forge-viewer-hypermodeling-revit

Node.js Platforms License

Viewer oAuth2 Data-Management OSS Model-Derivative

Description

This sample is a revision of the Learn Forge node.js tutorials demonstrating how to use hypermodeling ext in Forge Viewer.

Note for Revit model configuration

  1. The AecModelData will be produced for models of Revit 2018 and later, see:

  2. Floor plans must be placed in sheets and only available for the blew, see here for details.

    • 2D sheets with floor plan views, structural plan views, or reflected ceiling plan views. Other sheets with callout or area plan views are not supported currently.
    • Sheets with the Crop View checkbox enabled in Revit.
    • Views without view breaks. Views containing view breaks or view splits are not supported currently.

Thumbnail

thumbnail

thumbnail-2

Setup

To use this sample, you will need Autodesk developer credentials. Visit the Forge Developer Portal, sign up for an account, then create an app. For this new app, use http://localhost:3000/api/forge/callback/oauth as the Callback URL, although it is not used on a 2-legged flow. Finally, take note of the Client ID and Client Secret.

Run locally

Install NodeJS.

Clone this project or download it. It's recommended to install GitHub Desktop. To clone it via command line, use the following (Terminal on MacOSX/Linux, Git Shell on Windows):

git clone https://github.com/autodesk-forge/forge.learning.viewmodels
git checkout nodejs

To run it, install the required packages, set the enviroment variables with your client ID & Secret and finally start it. Via command line, navigate to the folder where this repository was cloned to and use the following commands:

Mac OSX/Linux (Terminal)

npm install
export FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
export FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
npm start

Windows (use Node.js command line from the Start menu)

npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
npm start

Open the browser: http://localhost:3000.

Packages used

The Autodesk Forge packages are included by default. Some other non-Autodesk packages are used, including express and multer for upload.

Tips & tricks

For local development/ testing, consider using the nodemon package, which auto-restarts your node application after any modification to your code. To install it, use:

sudo npm install -g nodemon

Then, instead of npm run dev, use the following:

npm run nodemon

Which executes nodemon server.js --ignore www/, where the --ignore parameter indicates that the app should not restart if files under the www folder are modified.

Troubleshooting

After installing GitHub Desktop for Windows, on the Git Shell, if you see the error setting certificate verify locations error, then use the following command:

git config --global http.sslverify "false"

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Eason Kang @yiskang, Forge Partner Development

About

This sample is a revision of the [Learn Forge](http://learnforge.autodesk.io) node.js tutorials demonstrating how to use hypermodeling ext in Forge Viewer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.5%
  • HTML 13.2%
  • CSS 5.3%