Skip to content

This sample use AWS S3 to store uploaded client AutoCAD drawing files from local file disk, and initiates Forge Design Automation process Compare function, results out the AutoCAD drawing with visual differences back to client. After submission to Forge design Automation service, input client drawings are flushed from S3 bucket

License

Notifications You must be signed in to change notification settings

MadhukarMoogala/fda-dwgcompare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workflow Sample for Comparing AutoCAD Drawing with Forge Design Automation

Node.js npm Platforms License OAuth2 Design-Automation

Description

This sample use AWS S3 to store uploaded client AutoCAD drawing files from local file disk, and initiates Forge Design Automation process Compare function, results out the AutoCAD drawing with visual differences back to client.

Working GIF

Incase of GIF not Loading

Live

see it live Forge DWG Compare

Setup

In order to use this sample you need Autodesk developer credentials. Visit the Forge Developer Portal, sign up for an account, then create an app. 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/MadhukarMoogala/fda-dwgcompare.git

To run it, install the required packages, set the environment variables with your Client IDand Client Secret, you need AWS AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, please refer Getting Started AWS and Configuring AWS finally start it. Via command line, navigate to the folder where this repository was cloned and use the following:

Mac OSX/Linux (Terminal)

npm install
export FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM FORGE DEVELOPER PORTAL>>
export FORGE_CLIENT_SECRET=<<YOUR FORGE CLIENT SECRET>>
export AWS_ACCESS_KEY_ID=<<YOUR AWS ACCESS KEY>>
export AWS_SECRET_ACCESS_KEY=<<YOUR AWS ACCESS SECRET>>
export AWS_DEFAULT_REGION=<<YOUR AWS REGION>>
export AWS_PROFILE=<<YOU AWS PROFILE>>
nodemon app

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

npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM FORGE DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR FORGE CLIENT SECRET>>
set AWS_ACCESS_KEY_ID=<<YOUR AWS ACCESS KEY>>
set AWS_SECRET_ACCESS_KEY=<<YOUR AWS ACCESS SECRET>>
set AWS_DEFAULT_REGION=<<YOUR AWS REGION>>
set AWS_PROFILE=<<YOU AWS PROFILE>>
nodemon app

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

Debuging

Create Launch.json

{   
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "envFile": "${workspaceFolder}/server/SET.env",            
            "program": "${workspaceFolder}/app.js"
        }
    ]
}

Create a .env file

 #FORGE
 FORGE_CLIENT_ID=putyourclientid
 FORGE_CLIENT_SECRET=putyoursecret
 #AWS
 AWS_ACCESS_KEY_ID=putyourawskeyid
 AWS_SECRET_ACCESS_KEY=putyourawsaccesskey
 AWS_DEFAULT_REGION=us-west-2
 AWS_PROFILE=madhukar

Deploy on Heroku To deploy this application to Heroku, After clicking on the button below, at the Heroku Create New App page, set your FORGE_CLIENT_ID, FORGE_CLIENT_SECRET, AWS_ACCESS_KEY_ID, AWS_DEFAULT_REGION, AWS_PROFILE

Deploy

License

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

Written by

Madhukar Moogala (Forge Partner Development) http://forge.autodesk.com

About

This sample use AWS S3 to store uploaded client AutoCAD drawing files from local file disk, and initiates Forge Design Automation process Compare function, results out the AutoCAD drawing with visual differences back to client. After submission to Forge design Automation service, input client drawings are flushed from S3 bucket

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages