Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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
Aug 14, 2014
14
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
 
Replies continue below

Recommended for you

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