Skip to content

ACC Sheet Manager:This sample demonstrates the use scenarios with ACC Sheet API

License

Notifications You must be signed in to change notification settings

autodesk-platform-services/aps-acc.sheet.manager

Repository files navigation

ACC Sheets Export & Import Sample

Node.js npm Platforms

Data-Management ACC Sheet API

MIT Level

Description

This sample demonstrates the following use cases:

  • Export sheets, version sets and uploads of ACC Sheet to excel file. The web application provides two options to display the ID properties either in Raw data and Human readable form.
  • View basic information of published sheets. View published sheet in APS Viewer
  • View basic information of uploads. List reviewing sheets of uploads (when upload status is IN_REVIEW)
  • Modify number and title of reviewing sheets
  • Publish reviewing sheets
  • Create new sheets from source PDF
  • Delete sheets (coming soon)

This sample is implemented based on Node.js version of Learn APS Tutorial, please refer to the tutorial for details about the framework.

Thumbnail

thumbnail

Demonstration

https://youtu.be/CoreCvObcjU

Web App Setup

Prerequisites

  1. APS Account: Follow this tutorial to create a APS Account, activate subscription and create an app. For this new app, use http://localhost:3000/api/aps/callback/oauth as Callback URL. Finally take note of the Client ID and Client Secret.
  2. ACC Account: must be Account Admin to add the app integration. It is same to BIM360 integration. Learn about how to integrate.
  3. ACC Sheet: In one project of Autodesk Construction Cloud, import some sheets manually through UI features. Please check product help for more information
  4. Node.js: basic knowledge with Node.js.
  5. JavaScript basic knowledge with jQuery

Running locally

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/

Install the required packages using npm install.

Environment

Set the environment 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 APS_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
export APS_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
export APS_CALLBACK_URL=<<YOUR CALLBACK URL>>

npm start

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

npm install
set APS_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set APS_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
set APS_CALLBACK_URL=<<YOUR CALLBACK URL>>

npm start

OR, set environment variables of launch.json for debugging.

Use Cases

  1. Open the browser: http://localhost:3000.
  2. After user logging, select a project. The code will start extracting all assets, version sets and uploads. They will be displayed in the main table view. Switch Raw data to check IDs data.
  3. Click Export option of Actions and click Execute button to download excel file.
  4. Switch to Sheets tab of the main table view, click any row of sheet, the corresponding sheet will be loaded in APS Viewer.

5. Switch to Uploads tab of the main table view, click any row of upload whose status is IN_REVIEW, the corresponding reviewing sheets will be displayed.

6. Click thumbnail column of the reviewing sheets table, the bigger thumbnail will show up

7. Click _title_ or _number_ column, you can edit the values.

8. Click **Modify Sheets**, Sheet API will update number or title with updated values 9. Click **Publish Sheets**, Sheet API will publish the reviewing sheets. The status of the upload will be changed to PUBLISHED. If any issue with the reviewing sheets, the API will throw exception message. 10. Click _Create New Version Set_ option of **Actions**, input name and issuanceDate of the new set and click _Execute_ button. It will create a new version set. Switch to Uploads tab of the main table view to check it.

11. Click _Create New Sheets_ option of **Actions**, input the id of the version set you want to upload to, click _Execute_ button, select one pdf file in the popup dialog. After the process is completed, the new upload will be available in the list of Uploads. The initial status is PROCESSING. When it is IN_REVIEW, you can review & publish sheets like step #5-9.

Deployment

To deploy this application to Heroku, the Callback URL for APS 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 APS.

Deploy

Limitation

  1. In this version, only one source PDF can be uploaded. It can be extended to multiple PDFs
  2. In this version, only title and number can be edited with reviewing sheets. It can be extended to support modification of other attributes.

Tips & Tricks

  1. When editing title or number of reviewing sheets, ensure the values are unique in one version set.
  2. This sample adopts the library of editable-table, which conflicts to date-picker of Bootstrap. So the sample workaround by common date picker (datetime-local).

Further Reading

Document

Tutorials:

Blogs:

License

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

Written by

Xiaodong Liang @coldwood, Developer Advocate and Support

Change Log

  • 09/01/2022: first release
  • 04/30/2024: New APS SDK migration

About

ACC Sheet Manager:This sample demonstrates the use scenarios with ACC Sheet API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published