Hi All,
I'm new to this forum, and I need help.
I'm use NX integrated in teamcenter and I need read the attributes of previus version of open part. I'm already to read the attributes of open part but not the previus version .... anyone can help me.
Thanks in advance
This is my code.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Module Module25
Sub Main(ByVal args() As String)
Dim theSession As Session = Session.GetSession()
Dim lw As ListingWindow = theSession.ListingWindow
Dim partNum As String
Dim partId As String
Dim partName As String
Dim partgen As String
Dim partrev As String
Dim partrevid As String
Dim partdesc As String
Dim partdesc2 As String
lw.Open()
lw.WriteLine("Full Path: " & theSession.Parts.Work.FullPath)
lw.WriteLine("Leaf: " & theSession.Parts.Work.Leaf)
Try
partNum = theSession.Parts.Work.GetStringAttribute("DB_PART_NO")
partId = theSession.Parts.Work.GetStringAttribute("PART_ID")
partName = theSession.Parts.Work.GetStringAttribute("DB_PART_NAME")
partgen = theSession.Parts.Work.GetStringAttribute("GENERATO DA")
partrev = theSession.Parts.Work.GetStringAttribute("DB_PART_REV")
partrevid = theSession.Parts.Work.GetStringAttribute("PART_REV_ID")
partdesc = theSession.Parts.Work.GetStringAttribute("DESCRIZIONE")
lw.WriteLine(partNum)
lw.WriteLine(partgen)
lw.WriteLine(partId)
lw.WriteLine(partName)
lw.WriteLine(partrev)
lw.WriteLine(partrevid)
lw.WriteLine(partdesc)
Catch ex As NXException
lw.WriteLine("exception " & ex.ErrorCode.ToString & ": " & ex.Message)
End Try
lw.Close()
End Sub
End Module