Our partner Ways Sweden AB has helped us to create an instruction on how to publish your 2c8 models to SharePoint.
You can publish to all types of SharePoint sites that do not have "Prevent Custom Script" activated.
This is a setting that can be done globally via O365 but can also be set per site. This setting is turned off per default on old classic sites.
You can turn it off by following this instruction:
When the setting is turned off you might have to create a new document library before it works. If it does not work it downloads ASPX-files instead of opening them.
Follow the instructions below to publish your 2c8 models to SharePoint.
1. Create a SharePoint document library
You can store many different libraries in SharePoint for different purposes, for example, regular Microsoft Office documents. You will need to create a document library in SharePoint for your 2c8 files. Name it for example "2c8 Processes".
You can publish 2c8 files to all types of SharePoint sites that do not have "Prevent Custom Scripts" activated. This is a setting that can be made globally in Microsoft 365 but can also be made per SharePoint site. As a default, this is turned off on old Classic SharePoint sites; therefore, we recommend using a Classic SharePoint site.
You can turn off "Prevent Custom Script" according to this instruction:https://learn.microsoft.com/sv-se/sharepoint/allow-or-prevent-custom-script
Even if you've turned it off you may need to create a new document library before it works and to make it work immediately. There may be a delay on existing document libraries before "Prevent Custom Scripts" takes effect.
If anything is incorrect, you can see it directly by the index.aspx file being downloaded instead of opening in a browser tab.
OneDrive synchronization of document libraries
To ease the publishing process from 2c8 to SharePoint we recommend that whoever publishes from 2c8 has access to the SharePoint library and synchronizes it to their OneDrive client. Open the document library in SharePoint and select "Sync". The document library will now synchronize and be accessible from your OneDrive.
This will ease the upcoming steps when you will publish the files from 2c8.
2. Publish models in 2c8 as ASPX-files
Edit your publishing profile in 2c8. In "Advanced settings", turn on the setting to publish HTML-files as ASPX-files.
Edit your publishing destination and browse to the folder for your synchronized document library.
Now when you publish from 2c8 all files will be saved to your OneDrive and automatically get synchronized to SharePoint. This may take a while depending on how many files should be synched.
The most important file is index.aspx that you will use in the next step.
3. Publish on a page in SharePoint or link to a new window
Depending on how you want the users to access the models from 2c8 you can either publish the models as a web part in SharePoint or make sure that the models open in a new window.
Link to a new window
The easiest option is to create a link from any page in Sharepoint. On a page in SharePoint, add a link as a web part for example. When you have added the link, edit it. In the example below we have added a web part called "Quick links".
Select "Change" and find the link to index.aspx inside the document library where you saved your 2c8 files.
When you have done this and published the page in SharePoint the link will open your 2c8 models in a new window. The upside with this is that the models will be able to use the full screen size.
Publish on a page in SharePoint
If you want the 2c8 models to be displayed inside a SharePoint page, follow the instructions below.
Create a new page in SharePoint, pick "Layout options" and "One column".
Add the "Embed" web part
Add an "Embed code".
Add the following code snippet:
<iframe width="900" height="700" src="link to your index.asxp"></iframe>
You can change width and height however you like, but the web part will adjust to the SharePoint layout.
How to find the link to index.aspx
Go to the document library where you have saved your 2c8 files. Select the index.aspx-file and select "Copy link".
4. Update your published files from 2c8
When you are publishing a new version of your 2c8 models you just publish from 2c8 and the models will be updated in SharePoint, since you have done all the steps above.
It will take a few minutes for the updated models to be accessible for everyone since the files will have to sync between OneDrive and SharePoint.