Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/petrbroz/bim360-issue-editor

Prototype application for bulk-editing BIM 360 issues using Autodesk Forge APIs.
https://github.com/petrbroz/bim360-issue-editor

autodesk-forge bim360 bootstrap jquery

Last synced: 2 months ago
JSON representation

Prototype application for bulk-editing BIM 360 issues using Autodesk Forge APIs.

Awesome Lists containing this project

README

        

# bim360-issue-editor

![Platforms](https://img.shields.io/badge/platform-Windows|MacOS-lightgray.svg)
![Node.js](https://img.shields.io/badge/node-%3E%3D%2010.0.0-brightgreen.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)

[![Data-Management](https://img.shields.io/badge/Data%20Management-v1-green.svg)](https://forge.autodesk.com/en/docs/data/v2/reference)
[![BIM360](https://img.shields.io/badge/BIM360-v1-green.svg)](https://forge.autodesk.com/en/docs/bim360/v1/reference)

![Intermediate](https://img.shields.io/badge/Level-Intermediate-blue.svg)

Prototype application for bulk-editing [BIM 360](https://www.autodesk.com/bim-360/) issues
using [Autodesk Forge](https://forge.autodesk.com) APIs.

![Screenshot](./docs/screenshot.png)

## Running

### Web Application

Live demo is running on https://bim360-issue-editor.autodesk.io.

In order to be able to access your BIM 360 project from this demo, you will need to add
the following Forge credentials as a [custom integration](https://forge.autodesk.com/en/docs/bim360/v1/tutorials/getting-started/manage-access-to-docs):

- Forge Client ID: `YhryNMLor4R1maFhY4zER8unpISoP5E4`
- Forge App Name: `Internal BIM360 Testing App`

### Command-Line Utility

The project includes two command-line scripts (under the _bin/_ folder) that can be used
to export issues to XLSX and import them back, locally. The scripts require a configuration
file that is generated by the web application.

> Since the configuration contains sensitive data such as authentication tokens,
> it is provided in a password-protected ZIP archive. The password is configured
> using the `CLI_CONFIG_PASSWORD` environment variable.

1. Navigate to the issue page for one of your BIM360 projects
2. Use the "Command-Line Config" button in the bottom toolbar
3. Download the archive and extract the configuration JSON
4. Open your command-line (make sure that you have [Node.js](https://nodejs.org/en) installed), and navigate to this project's root folder
5. Try one of the following commands:
- To export BIM360 issues to XLSX: `node bin/bim360-to-excel.js `
- To import issues from XLSX back to BIM360: `node bin/excel-to-bim360.js `
- Optionally, include the `--sequential` parameter to update issues in sequence instead of in parallel
- Optionally, include a `--range=-` parameter to only update issues in a given range of spreadsheet rows
> The scripts assume that the path to the spreadsheet is valid, so make sure that the entire folders structure is available

## Development

### Prerequisites

- [Node.js](https://nodejs.org) v10.15 or newer, and [yarn](https://yarnpkg.com)
- Forge application credentials ([creating an app](https://forge.autodesk.com/en/docs/oauth/v2/tutorials/create-app/))
- Callback URL of the Forge application must be set to your host followed by `/auth/callback` so, for example, when running the application locally, the URL should be `http://localhost:3000/auth/callback`
- BIM 360 project with the Forge application added as a [custom integration](https://forge.autodesk.com/en/docs/bim360/v1/tutorials/getting-started/manage-access-to-docs)

### Setup

- clone this repository
- install dependencies: `yarn install`
- (for now) manually build the _forge-server-utils_ dependency: `cd node_modules/forge-server-utils && yarn run build:node`
- provide the following env. variables
- `FORGE_CLIENT_ID` - client ID of your Forge application
- `FORGE_CLIENT_SECRET` - client secret of your Forge application
- `FORGE_APP_NAME` - name of your Forge application (used when asking user to setup the BIM 360 integration)
- `HOST_URL` - URL where the demo application is running (for example, _http://localhost:3000_)
- `SERVER_SESSION_SECRET` - secret phrase used to encrypt session cookies
- `CLI_CONFIG_PASSWORD` - password to be used to encrypt the command-line configuration file

#### On macOS

```bash
export FORGE_CLIENT_ID=
export FORGE_CLIENT_SECRET=
export FORGE_APP_NAME=
export HOST_URL=
export SERVER_SESSION_SECRET=
export CLI_CONFIG_PASSWORD=
yarn start
```

#### On Windows

```
set FORGE_CLIENT_ID=
set FORGE_CLIENT_SECRET=
set FORGE_APP_NAME=
set HOST_URL=
set SERVER_SESSION_SECRET=
set CLI_CONFIG_PASSWORD=
yarn start
```

#### Using VSCode

When using [Visual Studio Code](https://code.visualstudio.com), add this configuration to your _.vscode/launch.json_:

```json
{
"type": "node",
"request": "launch",
"name": "Launch Server",
"program": "${workspaceFolder}/server.js",
"env": {
"FORGE_CLIENT_ID": "",
"FORGE_CLIENT_SECRET": "",
"FORGE_APP_NAME": "",
"HOST_URL": "",
"SERVER_SESSION_SECRET": "",
"CLI_CONFIG_PASSWORD": ""
}
}
```

## License

This sample is licensed under the terms of the [MIT License](https://tldrlegal.com/license/mit-license).
Refer to [LICENSE](LICENSE) for more details.

## Author

Petr Broz ([@ipetrbroz](https://twitter.com/ipetrbroz)), Forge Partner Development Group