Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

history .vb help

Status
Not open for further replies.

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
 
Replies continue below

Recommended for you

Wow, I think you went some distance past that creek looking for water...
The only thing this program does is do Information-part-History ?
If yes, why not only add a button to you toolbar that does this ?
I assume it wont have the scrolling resize issue .

Regards,
Tomas



The more you know about a subject, the more you know how little you know about that subject.
 
it skips the dialog to pick a part from the list, I just want the work part.
 
Ah yes, you will save that 1 click on the "work part" button in that dialog.




The more you know about a subject, the more you know how little you know about that subject.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor