Skip to content
On this page

Drawing conversion

Due to the large size of AutoCAD files (DWG, DXF) format files, many versions, complex format leads to direct loading in the web page efficiency is slow, occupy space memory and easy to load failure, therefore, we design and provide a unique web CAD file format: .mxweb , the file format is a good solution to many of the above problems. mxweb files and CAD drawing files can be converted to each other using the cloud map development kit we provide.

Download the Cloud map development kit

We need to download MxDraw cloud map development Kit

Download cloud map development kit images

Download good MxDrawCloudServer1.0 TryVersion. 7 z compressed package, unpack,

Go to the MxDrawCloudServer\Bin\MxCAD\Release location in the unzived directory, which is the program directory responsible for converting the .mxweb format

Convert the location of the drawing program

Transfer CAD drawings to mxweb format

Mode one

Open the command window where the directory of MxDraw cloud image development Kit is located after decompression, find the path of the target drawing, start the command line and run the command: mxcadassembly path of the target drawing.

Example code is as follows:

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

mxcadassembly D:\test2.dwg

Wait for the command line output {"code":0} indicates that the drawing is successfully converted. Files successfully converted to .mxweb format are automatically saved in the same directory as the target drawing.

Converted drawing file

Mode two

Open the command window where the directory of MxDraw cloud image development Kit is located after decompression, find the path where the target drawing is located, and start the command line to run the command: mxcadassembly JSON string

Example code is as follows:

bash
mxcadassembly.exe {"srcpath":"D:\test2.dwg","outpath":"D:\","outname":"test", "compression":0}
Description
srcpathThe path of the file to be converted
outpathIndicates the path to the output file
outnameIndicates the file name of the output file (suffix must be added when converting mxweb to CAD drawings)
compression0 means that it is not compressed. Not writing this attribute means that it is compressed

mxweb format to CAD drawings

We can also convert the file paper in the format of '.mxweb 'into a file in the format of'.dwg 'through the program, and execute the following command:

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

Look out

The outname parameter must be followed by the suffix of the CAD drawing, usually.dwg

linux version

Linux version directory location of the program development kit in cloud MxDrawCloudServer/Bin/Linux/BinMxCAD

To access this directory we should first give 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 refer to the window version conversion file format for drawing conversion.