当前位置:网站首页>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 :

边栏推荐
- Circom 2.0: A Scalable Circuit Compiler
- Win10 解base64
- Prefabricated financial voucher Bapi
- P2404 splitting of natural numbers
- Makefile basics -- extensions
- Feeding Program Source Code to ZK VMs
- Gradle 学习 ----Gradle 与Idea整合
- What are the most problematic database accounts in DTS?
- 2018mysql technology Q & a collection, hoping to give some help to students who like MySQL
- [pyspark foundation] row to column and column to row (when there are more than one column)
猜你喜欢

小程序地理位置接口申请

Ch single database data migration to read / write separation mode

String matching (Huawei)

How to realize three schemes of finclip wechat authorized login

day10:声明式事务控制

Gradle learning - integration of gradle and idea

Day10: declarative transaction control

Feeding Program Source Code to ZK VMs

Web3安全 Go+Security

使用frp实现内网穿透
随机推荐
Calling Laser Galvanometer control in the application and development tutorial of motion control card
Among the database accounts in DTS, the accounts of MySQL database and mongodb database appear most. What are the specific accounts
P2404 splitting of natural numbers
[postgraduate entrance examination English vocabulary training camp] day 11 - offer, form, maintain, critical
day10:声明式事务控制
《论文复现》BiDAF代码实现过程(4)模型训练+验证
Jenkins introduction
[blind box app mall system] function introduction after online unpacking
支付宝上股票开户安全吗
With this PDF, I successfully got offers from ant, jd.com, Xiaomi, Tencent and other major manufacturers
【考研英语词汇训练营】Day 11 —— offer ,form ,maintain ,critical
Atcoder beginer contest 260 a~f problem solution
损失函数之Diou和Ciou loss
模板的使用
实现redis哨兵,模拟master故障场景
01_ UE4 advanced_ PBR material
Microcomputer principle: detailed explanation of CPU architecture
Description of differences between esp32c3 led PWM use and esp32
Mysql database commands
[pyspark foundation] row to column and column to row (when there are more than one column)