【发布时间】:2019-03-09 11:42:28
【问题描述】:
我有两个 dwg 文件:PID.dwg 和 3D.dwg
用例是在 PID.dwg 上运行一个函数,然后在 3D.dwg 上运行——尤其是按照这个顺序。
下面 SendCommand 中使用的命令来自一个单独的 DLL 文件,我在执行此函数之前使用 NETLOAD 加载该文件。
Dim app As AcadApplication = CType(Application.AcadApplication, AcadApplication)
' Ctype( Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication,
' Autodesk.AutoCAD.Interop.AcadApplication )
If isPidAnd3dOpened() Then
' Activate PID document
app.ActiveDocument = acDocPid
'acDocPid.Activate()
acDocPid.SendCommand("DOSOMETHINGONPID" & vbCrLf)
' Activate 3D document
app.ActiveDocument = acDoc3d
'acDoc3d.Activate()
acDoc3d.SendCommand("DOSOMETHINGON3D" & vbCrLf)
End If
"DOSOMETINGON3D" 的功能需要用户使用Editor.GetEntity 输入。
但是,当acDoc3d.SendCommand("DOSOMETHINGON3D" & vbCrLf) 执行时,它不会暂停等待用户输入。
我错过了什么?
【问题讨论】:
标签: vb.net autocad autocad-plugin