Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Module Module1
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
Dim rgb1(2) As Double
Dim rgb2(2) As Double
Sub Main()
If IsNothing(theSession.Parts.BaseWork) Then
'active part required
Return
End If
Dim workPart As Part = theSession.Parts.Work
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()
rgb1(0) = Math.Round(35.0/255.0, 7)
rgb1(1) = Math.Round(35.0/255.0, 7)
rgb1(2) = Math.Round(75.0/255.0, 7)
ufs.Disp.SetColor(UFConstants.UF_DISP_BACKGROUND_COLOR, UFConstants.UF_DISP_rgb_model, "", rgb1)
ufs.Disp.LoadColorTable()
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
End Function
End Module