Integration with 3rd party websites
Since 3.4
Introduction
HDC can be integrated with 3rd party websites and provide both static and interactive view on the data.
A static images can be delivered through a dedicated API interface that takes object information and other configuration parameters. To find out more please refer to HOPAGetView4Object manual.Â
For interactive integrations please start with reviewing a sample integration page provided for each application
https://myserver.bim.cloud/client/messageTester.html
Embedding
HDC Application can be loaded in anonymous mode (see Anonymous User).Â
To load the application, design an iframe location on your webpage that can look like this:
<div> <iframe width="800px" height="800px" class="hdcFrame"></iframe> </div>
Application Parameters
To load the application in a proper state, several important URL parameters must be used.Â
If the parameters are not provided, the application will load in it's normal state.Â
Parameter | Recommended Value for Embedded scenario | Possible Values |
---|---|---|
Viewport | EmbeddedViewer | EmbededViewer |
ViewerProperties | false |
|
Toolbar | true |
|
ToolbarStyle | simple |
|
ViewerSidePanel | false |
|
Sample URL with requried parameters:
var hdcUrl = hdcHost + '/AnonClient/?viewport=EmbeddedViewer&viewerProperties=true&toolbar=true&toolbarStyle=simple&ViewerSidePanel=false';
Communication
Direct communication with an application running within an iframe is not allowed. To achieve a bi-directional communication HDC is using a Window.postMessage() mechanism (Link)
All functions exposed by Embedded Viewer API are available through this method as well.Â
Please check the source of a sample page messageTester.html for samples on how to call and receive notifications from HDC Embedded application.Â
Sending requests to Embedded application
Sample request to show specific object:
Receiving requests from an Embedded application
Events
Events available through Message controller:
*.*.user.spot.select
*.*.user.spot.update
ui.system.ready
ui.docview.document.load
ui.system.messageapi.ready