当前位置:网站首页>CAD to WPF: Tips on converting CAD drawing files to WPF vector code files (xaml files)
CAD to WPF: Tips on converting CAD drawing files to WPF vector code files (xaml files)
2022-08-10 09:01:00 【dotNET cross-platform】
Foreword: In the following article, I will use a few very simple steps to demonstrate the method of converting CAD drawings to XAML code files for reference.
1. In order to demonstrate a simple operation, I will first open a blank CAD here and use it to draw the point content later.

Second, custom draw something casually, including three rectangles, three circles, an ellipse, and a spiral pattern, as well as a line of text, which is used as a test.

3. After the drawing is completed (in normal use, it may be directly after opening the CAD drawing), select File -> Save As, and save the drawing as a .dxf format file for subsequent AI tools to open.

Fourth, use AI tools to open .dxf files
[Remarks] Since the borders are all set to 1px when opened here, the three circles are thinner, please ignore this detail.

5. After the AI tool is opened, select File - Export to .xaml format.Under normal circumstances, it can be exported to silverlight and wpf. Here we choose to export to the xaml format supported by wpf.
[Remarks] The path exported by AI cannot contain Chinese, otherwise the export may be unsuccessful.

6. After the export is successful, in the export directory, you can see that a code file in .xaml format is generated.

Seven, open the text file and take a look, you can see the familiar xaml tag code, which is contained by the

8. Create a new WPF project. At present, the main form does not have any elements. Can the xaml code generated for subsequent testing be used.

9. Copy all the code of the exported xaml code file to the main form, and you can see that the main form designer automatically displays the effect of the element.Basically the same as the CAD drawing.

10. Let's run the program to see the effect after startup, as shown in the figure below, indicating that the exported code can be used directly and meets expectations.

11. For AI tools that do not have the option to export to WPF, a plug-in needs to be added.Plugin download address: http://mikeswanson.com/xamlexport/
The download address opens the following page, as shown in the figure below, a very detailed usage method has been prompted, and you can place the plug-in according to the prompt information.

12. The downloaded plug-in will have two aip files after decompression, one is supported by the MAC system and the other is supported by the Windows system, as shown in the figure below, stored in the plug- under the installation directory of the AI toolins folder.
[Remarks] If the AI installation is a cracked version or is not the default installation path, it may recognize that the plug-in is unsuccessful. For example, when opening the AI program, it may prompt "ai failed to load the plug-in".Category.

The above is the entire content of this article, thank you for your support.I wish the big guys a happy coding~~
If it helps, please like, repost, and watch.
边栏推荐
- JVM探究
- 微信小程序--》小程序生命周期和WXS使用
- 数据库注入提权总结(一)
- [Metaverse Omi Says] See how UCOUCO integrates performance art into the Metaverse
- Linux下载安装MySql
- 不想再干会计了,蝶变向新,勇往直前,最后成功通过转行测试实现月薪翻倍~
- 编程老手如何在autojs和冰狐智能辅助之间选择?
- Nvidia's gaming graphics card revenue plummets / Google data center explosion injures 3 people / iPhone battery percentage returns... More news today is here...
- 幂次方(暑假每日一题 20)
- FPGA时钟篇(三) MRCC和SRCC的区别
猜你喜欢

郭晶晶家的象棋私教,好家伙是个机器人

Spotify expresses its architectural design using the C4 model

Vivado时序约束中Tcl命令的对象及属性

DAY26:GetShell专题

【微服务架构】为故障设计微服务架构
![[Metaverse Omi Says] See how UCOUCO integrates performance art into the Metaverse](/img/2e/75e52bb202ae260daf23f44fa0d3e6.png)
[Metaverse Omi Says] See how UCOUCO integrates performance art into the Metaverse

JWT:拥有我,即拥有权力

Nvidia's gaming graphics card revenue plummets / Google data center explosion injures 3 people / iPhone battery percentage returns... More news today is here...

UGUI—事件,iTween插件

以技术御风险,护航云原生 | 同创永益 X 博云举办产品联合发布会
随机推荐
CAD转WPF: 关于CAD图纸文件转换为WPF矢量代码文件(xaml文件)的技巧
大体来讲,网站会被攻击分为几种原因
shell------常用小工具,sort,uniq,tr,cut
debezium-connector-mysql拉起docker报错:debezium启动docke
怎么使用【jmeter正则表达式提取器】解决返回值作参数的问题
【FAQ】【Push Kit】推送服务,回执配置一直报错、回执过期修改、怎么删除配置的回执
shell iterates over folders and outputs
Linux下载安装MySql
Unity—UGUI控件
mySQL增删改查进阶
1-31部 1-31套 和硬件工程师90天学习资料及笔记汇总
1 活动时间与安排
UGUI - Events, iTween Plugin
Docker搭建Mysql一主一从
【Enterprise Architecture】Agile and Enterprise Architecture: Strategic Alliance
PTA Exercise 2.1 Simple Calculator
ARM Architecture 3: Addressing and Exception Handling of ARM Instructions
初识Flink 完整使用 (第一章)
DataStream API(基础篇) 完整使用 (第五章)
不想再干会计了,蝶变向新,勇往直前,最后成功通过转行测试实现月薪翻倍~