|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我的步骤是这样的,请大虾们帮我看看问题出在什么地方.
1)找了一个例子如下:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpen.Utilities
Module catch_abort_signal_from_work_in_progress_dialog
Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Sub Main()
ufs.Abort.EnableAbort()
Dim the_counter As Integer = 0
Dim flag As Boolean = False
Do Until flag = True
flag = increment_integer_and_check_flag(the_counter)
Loop
ufs.Abort.ClearAbort()
MsgBox("The value of the_counter reached " & the_counter.ToString)
End Sub
Public Function increment_integer_and_check_flag(ByRef i As Integer) As Boolean
Dim local_flag As Boolean = False
i = i + 1
ufs.Abort.AskFlagStatus(local_flag)
Return local_flag
End Function
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module
2)打开VS,新建了一个console application,然后把上面的copy到modulel.vb中去,在project中把"启动对象"改成sub main,接下来debug,出现如图1的情况,发现在bin中生成一个像.exe的文件,双击出现如图2的情况,请帮我看看这是什么原因.谢谢了。 |
-
1.gif
(20.15 KB, 下载次数: 3)
附件1
-
2.gif
(23.83 KB, 下载次数: 0)
附件2
|