3D Viewer Integration Webpart for SharePoint is developed by Geiger Gruppe, for Using BIM Models integrated in SharePoint. Currently we are able to filter the model using SharePoint Lists. Further features will be added eventually. For further information please visit http://www.geigergruppe.de/sharepoint-3d-viewer.
This project is licencend under GNU GPL v3.0.
List of development tools and frameworks to use
- Node.js
- Gulp.js
- Yeoman
- Yeoman SharePoint generator
- React
If you want to push changes please fork the original repo. Any pull requests enhancing this projects are very welcome. If you are not developing on your own, also bug reports are helpful. We will try to fix them as soon as possible.
If you are experienced in developing SPFx webparts or development in general this quick start guide may be for you.
-
Install the most recent LTS version of Node.js v16
-
Install the required parts of the SharePoint Framework development toolchain: SPFx - Yeomen - Gulp
npm install gulp-cli yo @microsoft/generator-sharepoint --global
-
Trusting the self-signed developer certificate
gulp trust-dev-cert
A more detailed version of this part of the installation see below in documantation.
-
Clone Repository
git clone https://github.com/GeigerInnovation/3DVIeW4SP.git
-
Install dependencies
npm install
-
Enter your SharePoint tenant site in the serve.json file with replacing the value of the "initialPage" property
"initialPage": "https://https://enter-your-SharePoint-site/_layouts/workbench.aspx"
-
Create a list on your SharePoint tenant called:
"Modellliste"
-
Enter the following columns into the list:
"Title", "Name", "URN", "Eigenschaften Listen"
-
Enter a record into the just created list for the required data which are:
"Title", "Name" and "URN"
-
Enter your CLIENT_ID and CLIENT_SECRET in the accessToken.ts file in the marked line. You get these credentials from your Autodesk account
CLIENT_ID = "" /*Enter your Client_ID*/ CLIENT_SECRET = "" /*Enter your Client_Secret*/
-
Last step is to serve the SPFx Webpart with the command
gulp serve
For a more detailed version of the setup and installation guide see below.
Install the most recent LTS version of Node.js v16
-
Visit the official Node.js website: https://nodejs.org.
-
Click on the "Downloads" button on the homepage.
-
On the Downloads page, you will see different versions of Node.js available. Scroll down until you find the "16.x.x" release line. Click on the version number you want to install (e.g., 16.19.1).
-
On the version's download page, you'll find different installers for various operating systems. Choose the appropriate installer for your system. For example:
- For Windows, click on the Windows Installer button.
- For macOS, click on the macOS Installer button.
- For Linux, click on the Linux Binaries (x64) button.
-
Once the installer is downloaded, run the installer executable.
-
Follow the installation wizard's instructions. You can generally accept the default options, but you can also customize the installation if needed.
-
After the installation completes, open a command prompt or terminal window.
-
Verify that Node.js is installed correctly by running the following command:
node -v
Install development toolchain prerequisites
The SharePoint Framework development and build toolchain leverages various popular open-source tools. While most dependencies are included in each project, you need to install a few dependencies globally on your workstation.
npm install gulp-cli yo @microsoft/generator-sharepoint --global
Or you can install them one by one:
Gulp is a JavaScript-based task runner used to automate repetitive tasks. The SharePoint Framework build toolchain uses Gulp tasks to build projects, create JavaScript bundles, and the resulting packages used to deploy solutions.
Enter the following command to install the Gulp CLI:
npm install gulp-cli --global
Yeoman helps you kick-start new projects, and prescribes best practices and tools to help you stay productive. SharePoint client-side development tools include a Yeoman generator for creating new web parts. The generator provides common build tools, common boilerplate code, and a common playground website to host web parts for testing.
Enter the following command to install Yeoman:
npm install yo --global
The Yeoman SharePoint web part generator helps you quickly create a SharePoint client-side solution project with the right toolchain and project structure.
To install the SharePoint Framework Yeoman generator globally, enter the following command:
npm install @microsoft/generator-sharepoint –global
The SharePoint Framework's local webserver, used when testing your custom solutions from your development environment, uses HTTPS by default. This is implemented using a development self-signed SSL certificate. Self-signed SSL certificates are not trusted by your developer environment. You must first configure your development environment to trust the certificate.
A utility task is included in every SharePoint Framework project in the form of a gulp task. You can elect to do this now, or wait until you create your first project as covered in the Build your first SharePoint client-side web part (Hello World part 1) tutorial.
Once a project has been created with the Yeoman generator for the SharePoint Framework, execute the following command from within the root folder of the project.
gulp trust-dev-cert
Note: This assumes you have installed all dependencies with npm install after creating the project. This step will install all gulp tasks as part of a project.
- On the repository page, look for the green "Code" button and click on it.
- In the dropdown menu, ensure that "HTTPS" is selected (unless you prefer to use SSH).
- Copy the repository URL by clicking on the clipboard icon next to it.
- Navigate to the directory where you want to clone the repository using the cd command (e.g., cd Documents/Projects).
- Once in the desired directory, use the following command to clone the repository
git clone https://github.com/GeigerInnovation/3DVIeW4SP.git
Press Enter to execute the command.
- Navigate to folder “Forge Viewer” inside the repository
- Enter the command “npm install” to install the projects dependencies
npm install
- To display the served App in the browser you have to copy the URL from your SharePoint site tenant where you want the App to run, into the serve.json file and replace the placeholder for the initialPage property.
"initialPage": "https://localhost:5432/workbench"
- To receive a access token for displaying your models in the viewer you have to copy your CLIENT_ID and CLIENT_SECRET, which you get from your Autodesk account, into the quotes for ID and SECRET in the accessToken.ts component (see below).
CLIENT_ID = "" /*Enter your Client_ID*/
CLIENT_SECRET = "" /*Enter your Client_Secret*/
- Navigate to folder “Forge Viewer” inside the repository
- Enter the command “gulp serve” to serve the App
gulp serve
In order to display Models in the Viewer you have to create a SharePoint list, where you enter the properties of the translated Models.
-
Add necessary ShaprePoint lists
- Add Model list
Open your SharePoint Site on your Tenant where you want so serve the Application and create a new list called:
"Modellliste"
- Enter the following columns to that list:
"Title", "Name", "URN", "Eigenschaften Listen"
- Add Mapping lists (optional)
- Add Model list
Open your SharePoint Site on your Tenant where you want so serve the Application and create a new list called:
-
Create Flow for automatic Model translation (optional)
- You can create a Flow with Power Automate that will automatically upload to Forge and translate a file that was newly added to SharePoint Documents.
- Follow these steps: https://aps.autodesk.com/blog/sharepoint-online-integration
-
Alternatively you can manually translate your models and copy the URN into the create SharePoint list into the URN column.
Content will be added
- Bundle and Ship Webpart
- Add packed solution to SharePoint
Currently first time uploaded. Future Changes will be reported.
The project is based on Microsoft SharePoint and Autodesk Platform Service. It does not include any licences, keys or tokens. It is originally developed for internal use. We do not offer any support regarding issues in your own environment.