moog3
Marine/Ocean
- Nov 29, 2022
- 67
can one of the .vb experts please help with this journal..
It's VERY simple, I just made a button to interrogate the part-save history of the work part, (ie: information, part history).
Its working fine except for one small detail, (no biggie really), I figured out that after I used it the first time, I expanded the text, then closed that session, that locked it in as the default, so now I don't have to "expand all groups" every time...
The only issue is, If the work part is very old with lots of history, the list opens at the bottom, and I have to scroll to the top..
If there some .vb code I can include, that will... expand the text window and go to the top?
-----------------------------------------------------------------------------------------------
' NX 2007
' Journal created by phorton on Mon May 15 08:20:05 2023 E. Australia Standard Time
'
Imports System
Imports NXOpen
Module NXJournal
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
' ----------------------------------------------
' Menu: Information->Part->Part History...
' ----------------------------------------------
theSession.Information.DisplayPartHistory(workPart)
' ----------------------------------------------
' Menu: Tools->Journal->Stop Recording
' ----------------------------------------------
End Sub
End Module
It's VERY simple, I just made a button to interrogate the part-save history of the work part, (ie: information, part history).
Its working fine except for one small detail, (no biggie really), I figured out that after I used it the first time, I expanded the text, then closed that session, that locked it in as the default, so now I don't have to "expand all groups" every time...
The only issue is, If the work part is very old with lots of history, the list opens at the bottom, and I have to scroll to the top..
If there some .vb code I can include, that will... expand the text window and go to the top?
-----------------------------------------------------------------------------------------------
' NX 2007
' Journal created by phorton on Mon May 15 08:20:05 2023 E. Australia Standard Time
'
Imports System
Imports NXOpen
Module NXJournal
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
' ----------------------------------------------
' Menu: Information->Part->Part History...
' ----------------------------------------------
theSession.Information.DisplayPartHistory(workPart)
' ----------------------------------------------
' Menu: Tools->Journal->Stop Recording
' ----------------------------------------------
End Sub
End Module