Some test text!

Search
Hamburger Icon

Web / Guides / Setting up Client

Setting up WebViewer BIM Client

To get the sample working, both WebViewer BIM client and server must be setup and running. The server URL will be referenced in the front-end to allow communication between client and server.

Prerequisites

It is recommended you install Node and npm.

Setup application

  1. Run the following:
git clone https://github.com/XodoDocs/webviewer-BIM-sample.git
cd webviewer-BIM-sample
npm install
  1. Change serverURL variable in App.js to wherever your server is hosted. See Setting up WebViewer BIM Server section for details.
WebViewer({ path: "/webviewer/lib" }, viewer.current).then(async (instance) => {
  const license = `---- Insert commercial license key here after purchase ----`;
  const serverURL = `---- Insert server URL after setup ----`;

  const options = getViewerOptions(license);
  const webviewerBIM = await initializeBimViewer(instance, serverURL, options);
  webviewerBIM.File.load3dAsset(
    "Add URL to your 3D asset here"
  );
});

Run application

After setup is complete, run the application:

npm start

Get the answers you need: Chat with us