|
我使用VB.NET开发CAD2006,使用ShowModalDialog()打开一个窗体后,出现无法找到"无法找到主窗体"的错误
具体代码如下:
(1)在类中,除了通常的acmgd.dll及acdbmgd.dll,引用"AutoCAD 2006 Type Library"
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.ApplicationServices
_
Public Function INBSJ()
Dim FrmBzdmsj1 As New FrmBzdmsj
Application.ShowModalDialog(FrmBzdmsj1)
End Function
(2)在FrmBzdmsj窗体中
Public acadApp As AcadApplication = CType(Application.AcadApplication, AcadApplication)
Dim PNT As Object
ME.CLOSE
PNT = acadApp.ActiveDocument.Utility.GetPoint(, "请选择断面网格左下角:")'出现上述错误 |
|