Skip to content
On this page

Drawing Conversion

As with mxdraw drawing conversion, we need to convert the drawing format.

However, the conversion is no longer multiple .wgh files, but a single .mxweb file.

Files in .wgh format will no longer be maintained, please convert .mxweb format

Download MxDraw Cloud Development Package

We need to download the MxDraw Cloud Development Package

After downloading, there will be a compressed file named MxDrawCloudServer1.0TryVersion.7z, we unzip this file.

Enter the directory of the corresponding program, which is responsible for the conversion of the .mxweb format, at the location of MxDrawCloudServer\Bin\MxCAD\Release

The location of the conversion program

Convert CAD drawings

Suppose D:\test2.dwg is your drawing on your computer,

Suppose the folder of MxDraw's download and decompression: C:\Users\MxDev\Downloads\MxDrawCloudServer1.0TryVersion

Then please start the command line and run the following command:

bash
cd C:\Users\MxDev\Downloads\MxDrawCloudServer1.0TryVersion\MxDrawCloudServer\Bin\MxCAD\Release

mxcadassembly D:\test2.dwg

Wait for the command line output {"code":0 } to indicate that the drawing conversion is successful,

We can see that D:\test2.dwg.mxweb already exists.

The converted drawing file

Description of program parameters

mxcadassembly can be converted directly into the drawing path as above

It can also be passed as a JSON string like this:

bash
mxcadassembly {"srcpath":"D:\test2.dwg","outpath":"D:\","outname":"test", "compression":0}

Execution of the above command converts D:\test2.dwg to D:\test.mxweb and is uncompressed (file size increases, web pages open faster)

parametersdescription
srcpathFile path to convert
outpathoutput file path
outnameOutput file name (suffix required for converting mxweb to CAD drawings)
compression0 means no compression, do not write this attribute is compression

Convert mxweb format to CAD drawings

We can also convert drawings in .mxweb format to drawings in .dwg format

Command:

bash
mxcadassembly {"srcpath":"D:\test.mxweb","outpath":"D:\","outname":"test.dwg"}

Parameter outname must be added with the suffix name of CAD drawing, usually.dwg

Linux version

linux version The directory location of this program in Cloud Map development package MxDrawCloudServer/Bin/Linux/BinMxCAD

To access this directory we should first grant permissions to these files and copy some directories to the specified location:

bash
sudo chmod -R 777 mxcadassembly

sudo chmod -R 777 ./ mx/so/*

sudo  cp -r -f ./ mx/locale /usr/local/share/locale

​./mxcadassembly "{'srcpath':'/home/mx/test.dwg','outpath':'/home/mx/Test','outname':'xxx'}"

Then you can use it exactly like the window version.