随笔分类 - AUTOCAD二次开发
摘要:这代码挺有用的,当时帮我解决了很大的问题,感谢NetObjArx编程论坛的lzx838在 网上共享出来的代码。 Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; DocumentCollection ...
阅读全文
摘要://定义事件 Editor ed = doc.Editor; ed.PointMonitor += new PointMonitorEventHandler(ed_PointMonitor); //事件执行函数 void ed_PointMonitor(object sender, PointMonitorEventA...
阅读全文
摘要:http://www.objectarx.net/forum.php?mod=viewthread&tid=1243
阅读全文
摘要:Autocad的系统变量, 我们可以通过如下得到: Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable(/*MSG0*/"TILEMODE"); 但是有些是写在drawing,有些是registery. ----------------------------------------------------...
阅读全文
摘要:using System.Speech.Synthesis; SpeechSynthesizer sSpeechSynthesizer = new SpeechSynthesizer(); sSpeechSynthesizer .Speak("化肥会挥发!!!"); 注:xp不支持中文 如何获取程序当前目录 System.IO.Path.GetDirectoryName(Ap...
阅读全文
摘要:'获取CAD屏幕像素的比值 Function ViewScreen() As Double Dim ScreenSize As Variant ScreenSize = ThisDrawing.GetVariable("screensize") '当前视口的屏幕宽度和高度 Dim H As Variant H = ThisDrawing.GetVariable("views...
阅读全文
摘要:C#实现在CAD图纸中插入另一个DWG图块的代码PromptPointResult ppr = ed.GetPoint("请选择插入点:"); Point3d pt = ppr.Value; utility.WriteToEditor(pt.ToString()); PIDBlock pidBlock = new PIDBlock();//自己定义的图块类,保存图块的路径和名称 pidB...
阅读全文

浙公网安备 33010602011771号