当前位置:网站首页>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.
边栏推荐
- shell------常用小工具,sort,uniq,tr,cut
- 差分、前缀和模板
- 大体来讲,网站会被攻击分为几种原因
- 深度剖析“八大排序”(上)_ 探寻一些不为人知的细节
- ShardingSphere入门
- 【API 管理】什么是 API 管理,为什么它很重要?
- debezium-connector-mysql拉起docker报错:debezium启动docke
- Flink部署 完整使用 (第三章)
- 数据库注入提权总结(一)
- The implementation of the seemingly useless component (text gradient) in NaiveUI is so simple
猜你喜欢
随机推荐
差分、前缀和模板
原型和原型链
Different command line styles
浅谈DAO+DeFi+NFT模式开发代码技术方案丨链游元宇宙NFT盲盒项目技术开发逻辑(源码程序)
m.bjhjwy.com全面教学设备 类型包括: 教学仪器, 教学设备 ,
FPGA时钟篇(二) 7系列clock region详解
DAY25: Logic vulnerability recurrence
Docker搭建Mysql一主一从
OLTP and OLAP database architecture 】 【 : actual comparison
多线程浅谈
多线程知识点总结之温故而知新
[OAuth2] Nineteen, OpenID Connect dynamic client registration
Guys, may I ask, the oraclecdc error report is not serialized, but I see that the source code does not inherit serialization, what is the reason?
mySQL增删改查进阶
关于镜像源的一些记录
硬件工程师90天学习资料及笔记汇总20220730
Rust learning: 6.5_Array of composite types
【数据库架构】OLTP 和 OLAP:实际比较
A File Online Query Display and Download Function Realized by Delphi
FPGA中BEL Site Tile FSR SLR分别指什么?