摘要: 先看效果 整体思路, 1.创建快捷方式 查看代码 public class AcadStartUpHelper { ///https://hfsoft.blog.csdn.net/article/details/90166607?spm=1001.2101.3001.6661.1&utm_mediu 阅读全文
posted @ 2022-03-26 15:09 南胜NanSheng 阅读(800) 评论(1) 推荐(0) 编辑
摘要: 最终效果 整体思路 1.通过反射dll内部的所有的方法,找到有command method attribute的方法 2.通过com方法生成tool bar和menu bar tool bar menu bar .处理事件和插件初始化加载 查看代码 Imports System.IO Imports 阅读全文
posted @ 2022-03-26 14:49 南胜NanSheng 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 点击查看代码 Public Sub MyCMD_导出VBA代码() Const Module = 1 Const ClassModule = 2 Const Form = 3 Const Document = 100 Const Padding = 24 Dim VBComponent As Obj 阅读全文
posted @ 2021-10-09 19:50 南胜NanSheng 阅读(430) 评论(0) 推荐(0) 编辑
摘要: netdxf介绍github库 https://github.com/haplokuon/netDxf netDxf是一个.net库,用C语言编程,用于读取和写入AutoCAD DXF文件。它支持文本和二进制格式的AutoCad2000、AutoCad2004、AutoCad2007、AutoCad 阅读全文
posted @ 2021-03-27 07:56 南胜NanSheng 阅读(3317) 评论(0) 推荐(1) 编辑
摘要: 主程序代码 删除dll依旧可以执行 https://files.cnblogs.com/files/NanShengBlogs/sample.zip 1 static void Main(string[] args) 2 { 3 //PrincipalContext ctx = new Princi 阅读全文
posted @ 2020-10-17 21:01 南胜NanSheng 阅读(2112) 评论(0) 推荐(1) 编辑
摘要: 1# 设置页面设置 2# 输入publish 命令,发布为改为pdf,将所有布局的页面设置设为刚才设置的页面设置,选中需要打印的布局点击发布完成批量打印 , 打印到我的文档下面,自动以dwg的文件名称命名而且自动合并在一起了 阅读全文
posted @ 2020-10-15 21:19 南胜NanSheng 阅读(1800) 评论(0) 推荐(0) 编辑
摘要: 不说了,直接上代码,参照kean的博客吗,这是添加边界的代码 https://www.keanw.com/2012/10/querying-for-xclip-information-inside-autocad-using-net.html 1 using Autodesk.AutoCAD.App 阅读全文
posted @ 2020-10-15 19:42 南胜NanSheng 阅读(587) 评论(0) 推荐(0) 编辑
摘要: 1 %~dp0regasm.exe %~dp0comDll.dll /tlb %~dp0comDll.tlb 2 pause regasm.exe 来自下面的图片所示的位置,具体的使用方法见msdn的文档 https://docs.microsoft.com/zh-cn/dotnet/framewo 阅读全文
posted @ 2020-10-13 20:45 南胜NanSheng 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 主要的过程,日后操作autocad lt也应该可以用此方法 1 var pros = Process.GetProcessesByName("acad"); 2 if (pros.Length == 0) 3 { 4 MessageBox.Show("没有找到acad进程,请检查后再运行本程序!") 阅读全文
posted @ 2020-10-04 13:26 南胜NanSheng 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: 输入参数copy砖红色的内容到cad的命令行就可以画出对应的形状 阅读全文
posted @ 2020-09-27 20:36 南胜NanSheng 阅读(423) 评论(1) 推荐(0) 编辑