here is how to get the part number of the part in the drawing:
first(splitstring(ug_askCurrentWorkPart();"_"))
this assumes you have an underscore underneath it in the name and removes everything after.
let me know if there is a better way, this is my first post here on eng-tips
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part =...