Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

There are two options to open a file. Either you can open it through an API server or directly from hard disk.

Supported file formats: dwg, dwt, dxf (up to 2018)

Open file from hard disk

To open a file with editor you have to simply pass file path including file protocol prefix in fileUrl parameter to editor url.


Like this:

http://localhost:8081/editor?fileUrl=file:////home/andrea/Documents/My%20Drawings/test.dwg


Please note that only view-only mode is supported when opening file from disk. It is required to open a file through API server if you want to open it in editing mode.

Open file through API server

First you need to run an API server. There is a simple API server that implements all required REST APIs used by editor application to open and save files. It is located in installation directory besides Kudo folder in API_server.


Before you setup API server, you need to install nodejs (https://nodejs.org/en/download/)


Now you can run API server:


  1. Open command line and go to /opt/graebert-gmbh/Kudo-Server/API_server

  2. Run “sudo npm install” to install server

  3. Run “node bin/www” to run server


API server now runs on port 3000. See next section how to open a files with editor.


To open a file with editor you have to pass API server and file to editor url.

Required parameters are:

  • server - specifies the API server url what is http://localhost:3000 for above installed API server

  • file - path of the drawing file you want to open

  • access - mode you want to open the file in. Accepted values “edit” for editing and “view” for view mode. If not passed, edit mode is used


So url to open a drawing should be like:

Editor:

http://localhost:8081/editor?server=http://localhost:3000&file=/home/andrea/Documents/My%20Drawings/test.dwg

Viewer:

http://localhost:8081/editor?server=http://localhost:3000&file=/home/andrea/Documents/My%20Drawings/test.dwg&access=view

  • No labels