' NX 10.0.2.6
' Journal created by sa.cad.tcservice on Mon Dec 14 14:13:05 2015 W. Europe Standard Time
'
Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String) 

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
' ----------------------------------------------
'  Menü: Datei->Öffnen...
' ----------------------------------------------
Dim markId1 As NXOpen.Session.UndoMarkId
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start")

theSession.SetUndoMarkName(markId1, "Teiledatei öffnen-Dialogfenster")

Dim markId2 As NXOpen.Session.UndoMarkId
markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Teiledatei öffnen")

theSession.DeleteUndoMark(markId2, Nothing)

Dim markId3 As NXOpen.Session.UndoMarkId
markId3 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Teiledatei öffnen")

theSession.DeleteUndoMark(markId3, Nothing)

theSession.SetUndoMarkName(markId1, "Teiledatei öffnen")

theSession.DeleteUndoMark(markId1, Nothing)

theSession.Parts.SetNonmasterSeedPartData("#ObjectCliName#")

Dim basePart1 As NXOpen.BasePart
Dim partLoadStatus1 As NXOpen.PartLoadStatus
basePart1 = theSession.Parts.OpenBaseDisplay("#ObjectCliName#", partLoadStatus1)

Dim workPart As NXOpen.Part = theSession.Parts.Work

Dim displayPart As NXOpen.Part = theSession.Parts.Display

partLoadStatus1.Dispose()
Dim markId4 As NXOpen.Session.UndoMarkId
markId4 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Enter Gateway")

Dim markId5 As NXOpen.Session.UndoMarkId
markId5 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Enter Modeling")

' ----------------------------------------------
'  Menü: Datei->Schließen->Alle Teile
' ----------------------------------------------
theSession.Parts.CloseAll(NXOpen.BasePart.CloseModified.CloseModified, Nothing)

workPart = Nothing
displayPart = Nothing
' ----------------------------------------------
'  Menü: Werkzeuge->Journal->Stopp
' ----------------------------------------------

End Sub
End Module
