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)
...
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:
Open command line and go to /opt/graebert-gmbh/Kudo-Server/API_server
Run “sudo npm install” to install server
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:
Viewer: