/bim360-zip-extract

extract files from a very large zip file, on bim360

Primary LanguageJavaScriptMIT LicenseMIT

bim360-zip-extract

extract files from a very large zip file, on bim360 Also, detects the difference between .RVT and .ZIP

The problem:

0-theProblem 1-step1-partial-transfer 2-step2-create-incomplete-zip-file-decode-dir 3-step3-use-offsets-and-retrieve-file-with-range-get 4-step4-unzip-file-and-save

deployed to http://bim360-zip-extract.herokuapp.com/

Walkthrough video (YouTube): https://youtu.be/02ChjbwLjUY

Screen Shot 2021-02-05 at 6 49 25 PM

Instructions:

  1. GetBIM360access-token fromBIM360( use the debug tool, network console, type ‘manifest’)
  2. Copy/Paste Access-token into the Access-token box
  3. In a separate browser, Go to yourBIM360source folder
  4. Copy/Paste theBIM360source URL into the ‘Source' box
  5. Now, navigateBIM360to your destination Folder (and Project) and Copy/Paste theBIM360URL into the ‘Destination' box
  6. Click the blue ‘login’ button, wait, and you should see the Tree-list appear
  7. Now, “Double-click" on the Revit file (that is disguised as azip), in the tree-view. It should ‘expand’
  8. Now, “Double-click” on the sub-file, you want to transfer
  9. Click the blue “transfer” button and wait for the file to appear on the right “destination” Tree-list

Four API's

Step1: List BIM360 folder contents API

endpoint: bim//list

note: make sure that project starts with a b. .. ie. b4589cd9-ef9f-44a0-bea9-cc0dbc7f4544 becomes b.b4589cd9-ef9f-44a0-bea9-cc0dbc7f4544

Step2: List ZIP directory API

endpoint: /listZipContents

Reference: The structure of a PkZIP


Step3: Transfer API

endpoint: /transfer

  • INPUT: filename
  • OUTPUT: was transfer successful? (json format)
  • Example: /transfer?filename=master.rvt
  • Optional INPUT: destProject, destFolder (specify different destination "project & folder")

Step4: Transfer Progress API

endpoint: /status

  • INPUT: filename
  • OUTPUT: get progress of transfer (json format)
  • Example: /status?filename=master.rvt

DEMO: https://bim360-zip-extract.herokuapp.com

...