Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh all TC attributes by journal

Status
Not open for further replies.

cschnei

Industrial
Joined
Aug 14, 2014
Messages
14
Location
DE
Hello,
I am trying to refresh all TC attributes like "File -> Properties - Reload Atrributes from Teamcenter" with a journal file. Recording the journal does not work. So I am trying this code but with no success. I am allways getting errors.

Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.PDM

Module NXJournal

Sub Main

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work

Dim displayPart As Part = theSession.Parts.Display

Dim part1 As PDM.PdmPart
'part1 = workPart

Dim databaseAttributeManager1 As PDM.DatabaseAttributeManager
databaseAttributeManager1 = part1.NewDatabaseAttributeManager()
DatabaseAttributeManager1.LoadAttributes(true)


End Sub
End Module

Thanks in advanced for any help.
Carsten
 
I solver it by me own, just a little mistake. If someone else needs it, this is my solution:

Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.PDM

Module NXJournal



Sub Main

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work

Dim displayPart As Part = theSession.Parts.Display


Dim databaseAttributeManager1 As PDM.DatabaseAttributeManager
	databaseAttributeManager1 = workpart.PDMPart.NewDatabaseAttributeManager()
	DatabaseAttributeManager1.LoadAttributes(true)


End Sub
End Module

Best regrads
Carsten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top