当前位置:网站首页>H5 online CAD background reading and writing CAD files
H5 online CAD background reading and writing CAD files
2022-07-24 22:03:00 【51CTO】
explain
Background offering MxFileConvert.exe Program , It can be CAD The drawing is converted into the format that the foreground can load and display , See : MxDraw help Medium “ How to browse in your own system dwg file ” chapter , The program can also be used in the conversion process , Use JS Programming , Reading and writing CAD file , And read CAD The drawing data can be written as json file , It is convenient to send it to the front desk .
How to write in the background JS Program
Principle that :MxFileConvert.exe start-up Node.js, First load the CAD modular , Reload js Program , Then extract CAD Drawing data .

Development steps :
A. install vs2019,node.js,TypeScript Running environment
B. Open the installation directory ,Bin\MxDrawNode\MxDrawNode.sln engineering
Here's the picture :

In the example, use DoGetEntityData Get the object data on the drawing , For example, text data , Then write json file , This file can be used by the foreground Get Agreement acquisition , And then use .
Get the text code on the specified layer as follows :
C. compiler , Generate MxConvert.js
hold dist\mxconvert All under directory js Copy program to Bin\Release\mxconvert Under the table of contents , Overwrite original file , Here's the picture :C. compiler , Generate MxConvert.js


D. Start the program
Command line in MxDrawCloudServer\Bin\Release Catalog
Execute code :
Run the extractor , Here's the picture :

Successful execution ..\Test Catalog , Generate data files , Here's the picture :

Generated json The contents of the document :

E. Error viewing , Log file location
In the process of program running , Error message , It will be automatically written to the log file , Log files , The default is in the following directory :
C:\Users\MxDraw\AppData\Local\Temp\MxCloudDebug
The following screenshots :

Log file content :

边栏推荐
- Makefile basics -- extensions
- Huawei cloud data governance production line dataarts, let "data 'wisdom' speak"
- [Matplotlib drawing]
- 支付宝上股票开户安全吗
- Leetcode 101. symmetric binary tree
- Applet location interface application
- Circom 2.0: A Scalable Circuit Compiler
- 运动控制卡应用开发教程之调用激光振镜控制
- Brand new: the latest ranking of programming languages in July
- What is the database account in DTS?
猜你喜欢

Volcano engine releases cloud growth solutions for six industries

Gather relevant knowledge points and expand supplements
![[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose](/img/6e/97e9335b7017e6e40d248252493e80.png)
[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose

C# 使用SQLite

Web3安全 Go+Security

大咖对话:品牌扎堆数藏赛道,下半场的机遇、挑战在哪里?
![[SOC] the first project of SOC Hello World](/img/ae/326312cb3b5a372c7b8b048936a9f2.png)
[SOC] the first project of SOC Hello World

My love lesson 2 - remove webpage pop-up
![[shallow copy and deep copy], [heap and stack], [basic type and reference type]](/img/cc/d43e0046d83638f381c34b463f64a2.png)
[shallow copy and deep copy], [heap and stack], [basic type and reference type]

Es+redis+mysql, the high availability architecture design is awesome! (supreme Collection Edition)
随机推荐
[pyspark foundation] row to column and column to row (when there are more than one column)
2022 Tsinghua summer school notes L2_ 1 basic composition of neural network
Thread pool learning
Jenkins introduction
[development tutorial 6] crazy shell arm function mobile phone - interruption experiment tutorial
Huawei Router: basic principle and configuration of Isis (including experiment)
How to modify the IP address of kubernetes node?
LED digital display driver IC and anti-interference LED digital tube display driver ic-vk1s68c ssop24 are applicable to finger clip pulse oximeter, arm electronic sphygmomanometer, thermometer, fetal
《论文复现》BiDAF代码实现过程(4)模型训练+验证
一键编译安装redis6.2.4
Clever use of sort (list & lt; T & gt;, comparator & lt;? Super T & gt;) comparator
[Matplotlib drawing]
What should I do when selecting the RDS instance access method?
图像处理笔记(1)图像增强
陈春花与莫言,都有苦难言
From front-line development to technical director, you are almost on the shelf
2022牛客多校7.23
Gradle学习集合整合
What should I pay attention to when choosing the self built database access method on ECs?
leetcode:不可能得到的最短骰子序列【思维题 + 分组思想】