Copy DB_PART_NO into Clipboard

Here I have written a small program
In Active Work Part Copy DB_PART_NO into Clipboard.

Best Regards
BK

' Copy DB_PART_NO (Active Work Part) into Clipboard
' Ausgabe der DB_PART_NO des Aktiven Parts in den Windows Zwischenspeicher (Clipboard)
' Tested in NX10.0.3
' Copyright 2015 Big King

Option Strict Off
Imports System
Imports NXOpen

Module NXJournal

Sub Main

Dim theSession As Session = Session.GetSession()

Dim workPart As Part = theSession.Parts.Work

' it's only Filename without Revision
Dim filename As String = workPart.GetStringAttribute("DB_PART_NO")

'System.Windows.Forms.MessageBox.Show(filename)

'Clipboard

My.Computer.Clipboard.SetText(filename)

End Sub
End Module