Hide menu
Installation

This chapter provides a step-by-step guide to prepare your environment.

Download Web Toolkit

First, download and extract the Web Toolkit package you received in the Welcome email when starting the 30-days evaluation period.

On Windows use native "Extract All" command in right-click menu:

Extract all right click menu

On Unix-like operating systems use embedded archiver or unzip tool in console.

unzip cadex_webtoolkit_20200526.zip -d cadex_webtoolkit_20200526

How to use Web Toolkit locally

CAD Exchanger Web Toolkit loads models data from external files, due to browsers' same origin policy security restrictions, loading from a file system will fail with a security exception.

There are two ways to solve this:

1. Change security for local files in a browser

This allows you to access your page as:

file:///filePath.html

In this case, be aware that you may open yourself to some vulnerabilities if using the same browser for a regular web surfing. You may want to create a separate browser profile / shortcut used just for local development to be safe.

2. Run files from a local web server

This allows you to access your page as:

http://localhost/fileName.html

There are many simple HTTP servers available which have enough functionality to run examples and tutorial.

  • Node.js server

    Node.js has a simple HTTP server package. To run (from your local directory):

    npx http-server . --cors -p 8000
  • Python server

    Python has a built-in http server module. To run (from your local directory):

    # Python 2.x
    python2 -m SimpleHTTPServer
    # Python 3.x
    python3 -m http.server
  • PHP server

    PHP also has a built-in web server. To run (from your local directory):

    # php 5.4.0+
    php -S localhost:8000

For more complex cases, the server part should provide model data as a stream of bytes, such that it can be accepted on client as ArrayBuffer object. For more details please refer to the Web API documentation.

CAD Exchanger CLI

For simplicity, the examples will be using CAD Exchanger CLI (Command Line Interface) in order to prepare original 3D files for Web Toolkit. Other technologies – CAD Exchanger SDK and CAD Exchanger Cloud API - will be considered in dedicated examples and advanced topics.

Follow instructions in the CLI documentation to download and install CLI. Make sure to copy the evaluation license key to the directory containing CLI executable. To check that installation was successful, run some simple conversion:

On Windows:

cd "C:\Program Files\CAD Exchanger\bin"
ExchangerConv.exe -i ..\models\conrod.jt -e C:\temp\output\conrod.cdxfb

On Linux:

cd "<CAD Exchanger install path>/bin"
./ExchangerCLI.sh -i ../models/conrod.jt -e /tmp/conrod.cdxfb

On macOS:

cd "/Applications/CAD Exchanger.app/Contents/MacOS"
./ExchangerConv -i ../models/conrod.jt -e /tmp/conrod.cdxfb