Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 783

Browse Load options directly

$
0
0

Hi all,
please go through below code and help me if any changes required to make it work better.

' NX 10.0.1.4' Journal created by gashaik on Mon Apr 25 11:02:33 2016 India Standard Time' Load options browse directly from file 
Option Strict OffImports System
Imports NXOpen
Imports NXOpenUI
Imports System.Windows.Forms 
Module NXJournal
Sub Main (ByVal args()AsString) 
Dim theSession As NXOpen.Session= NXOpen.Session.GetSession()Dim Load1 As NXOpen.Session.UndoMarkIdDim Location1 AsString 
 
Location1 =(NXInputBox.GetInputString("Location:(Please Remove "" Character from location)"))If Location1 =""ThenExitSub 
Load1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Invisible, "Start") 
theSession.SetUndoMarkName(Load1, "Assembly Load Options Dialog") 
theSession.Parts.LoadOptions.Restore(Location1) 
MessageBox.Show(Location1, "Load Location", _
MessageBoxButtons.OK, MessageBoxIcon.Information) 
 
EndSub 
PublicFunction GetUnloadOption(ByVal dummy AsString)AsInteger 
        'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination 
    EndFunction 
End Module

Viewing all articles
Browse latest Browse all 783

Trending Articles