Befuddled
Aerospace
- Jan 9, 2008
- 75
All,
I was creating a short bit of code to cycle through some stuff and report to the listing window as it went..... but it only seems to display the data in the listing window after execution... not dynamically...
The grey matter is recalling something about the move to HTML (but its too grey and old)
Using NX1973 if that makes a difference?
Is it possible to make NX report to a window dynamically?
Cheers in advance B.
simple bit of code to prove it:-
'--------------------------------------------------------------------------
Option Strict Off
Imports System
Imports NXOpen
Imports nxopen.uf
Module display_count
Sub Main (ByVal args() As String)
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim theUFSession As UFSession = UFSession.GetUFSession()
Dim theUI As UI = UI.GetUI()
Dim theUISession As UI = UI.GetUI
Dim ItemCnt as integer
Dim LW As ListingWindow = theSession.ListingWindow
lw.Open()
Dim num as integer = 1
Do Until num = 10
lw.WriteLine("Item " & num.ToString())
num = num +1
Loop
lw.close()
End Sub
'-------------------------------------------
' > function to exit and clean up
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module
I was creating a short bit of code to cycle through some stuff and report to the listing window as it went..... but it only seems to display the data in the listing window after execution... not dynamically...
The grey matter is recalling something about the move to HTML (but its too grey and old)
Using NX1973 if that makes a difference?
Is it possible to make NX report to a window dynamically?
Cheers in advance B.
simple bit of code to prove it:-
'--------------------------------------------------------------------------
Option Strict Off
Imports System
Imports NXOpen
Imports nxopen.uf
Module display_count
Sub Main (ByVal args() As String)
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim theUFSession As UFSession = UFSession.GetUFSession()
Dim theUI As UI = UI.GetUI()
Dim theUISession As UI = UI.GetUI
Dim ItemCnt as integer
Dim LW As ListingWindow = theSession.ListingWindow
lw.Open()
Dim num as integer = 1
Do Until num = 10
lw.WriteLine("Item " & num.ToString())
num = num +1
Loop
lw.close()
End Sub
'-------------------------------------------
' > function to exit and clean up
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module