Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=blue]Option[/color] [COLOR=blue]Strict[/color] [COLOR=blue]Off[/color]
[COLOR=blue]Imports[/color] System
[COLOR=blue]Imports[/color] NXOpen
[COLOR=blue]Module[/color] Module1
[COLOR=blue]Sub[/color] Main()
[COLOR=blue]Dim[/color] theSession [COLOR=blue]As[/color] Session [COLOR=blue]=[/color] Session.GetSession()
[COLOR=blue]Dim[/color] workpart [COLOR=blue]As[/color] Part [COLOR=blue]=[/color] theSession.Parts.Work
[COLOR=blue]Dim[/color] dwgSheets() [COLOR=blue]As[/color] Drawings.DrawingSheet [COLOR=blue]=[/color] workpart.DrawingSheets.ToArray
[COLOR=blue]Dim[/color] lw [COLOR=blue]As[/color] ListingWindow [COLOR=blue]=[/color] theSession.ListingWindow
lw.Open()
[COLOR=blue]Dim[/color] i [COLOR=blue]As[/color] [COLOR=blue]Integer[/color] [COLOR=blue]=[/color] 0
[COLOR=blue]For[/color] [COLOR=blue]Each[/color] dwg [COLOR=blue]As[/color] Drawings.DrawingSheet [COLOR=blue]In[/color] dwgSheets
lw.WriteLine("Sheet name: " [COLOR=blue]&[/color] dwg.Name)
lw.WriteLine("Length: " [COLOR=blue]&[/color] dwg.Length)
lw.WriteLine("Height: " [COLOR=blue]&[/color] dwg.Height)
lw.WriteLine("")
[COLOR=blue]Next[/color]
lw.WriteLine("There are " [COLOR=blue]&[/color] dwgSheets.Length [COLOR=blue]&[/color] " sheet(s) [COLOR=blue]in[/color] the file")
lw.Close()
End [COLOR=blue]Sub[/color]
[COLOR=blue]Public[/color] [COLOR=blue]Function[/color] GetUnloadOption(ByVal dummy [COLOR=blue]As[/color] [COLOR=blue]String[/color]) [COLOR=blue]As[/color] [COLOR=blue]Integer[/color]
[COLOR=green]'Unloads the image when the NX session terminates[/color]
GetUnloadOption [COLOR=blue]=[/color] NXOpen.Session.LibraryUnloadOption.AtTermination
End [COLOR=blue]Function[/color]
End [COLOR=blue]Module[/color]