Code sample to demonstrate how to exchange data between BIM360 Cost Management and CSV file
This sample demonstrates exchanging properties of Budget, Contract, Cost item and Change Order between cost module and .CSV file using BIM 360 Cost Management API. It includes 3 main tasks:
This sample is implemented based on Node.js version of Learn Forge Tutorial, please refer to https://learnforge.autodesk.io/ for the details about the framework.
https://bim360cost-exchange.herokuapp.com/
For using this sample, you need an 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 Callback URL. Finally take note of the Client ID and Client Secret.
Install NodeJS, version 8 or newer.
Clone this project or download it (this nodejs
branch only). 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-bim360.costmanagement.exchange.csv
Install the required packages using npm install
.
Environment variables
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 and use the following:
Mac OSX/Linux (Terminal)
npm install
export FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
export FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
export FORGE_CALLBACK_URL=<<YOUR CALLBACK URL>>
npm start
Windows (use Node.js command line from Start menu)
npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
set FORGE_CALLBACK_URL=<<YOUR CALLBACK URL>>
npm start
Open the browser: http://localhost:3000.
Please watch the Video for the detail setup and usage, or follow the steps:
To deploy this application to Heroku, the Callback URL for Forge must use your .herokuapp.com
address. After clicking on the button below, at the Heroku Create New App page, set your Client ID, Secret and Callback URL for Forge.
const Enter_Replacement = '\xfe';
const Comma_Replacement = '\xfd';
Document:
Tutorials:
Blogs:
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
Zhong Wu @johnonsoftware, Forge Partner Development