随笔分类 -  CAD二次开发

摘要:Use Thread for background processingByAdam NagyFrom inside my command I'm starting a background thread that synchronizes with a database. Once that finishes I'd like to keep using the AutoCAD .NET API to do some further modifications in the database. Unfortunately, when I'm calling the A 阅读全文
posted @ 2012-10-20 16:30 pensir 阅读(1365) 评论(0) 推荐(0)
摘要:Option Explicit Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As LongPrivate Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As LongPrivate lHwnd As Long Private Sub Form_Load() On Error GoTo ErrTrap Dim acadAp 阅读全文
posted @ 2011-04-17 16:50 pensir 阅读(1166) 评论(0) 推荐(0)
摘要:之前写的VBA代码,如果全部用.NET改写,比较劳命伤财,没什么兴趣改写。所以用了一种很偷懒的方法。 通过com方式调用AutoCAD 200x Type Library,和AutoCAD/ObjectDBX Common xx.x Type Library,定义VBA中的ThisDrawing对象,书写比较规范的VBA代码基本上不用做什么修改就能运行了。 对于VBA中的窗体,可以先导出为VB窗体... 阅读全文
posted @ 2010-04-23 23:45 pensir 阅读(1378) 评论(0) 推荐(0)