×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Refresh all TC attributes by journal

Refresh all TC attributes by journal

Refresh all TC attributes by journal

(OP)
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 --> vb

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

RE: Refresh all TC attributes by journal

(OP)
I solver it by me own, just a little mistake. If someone else needs it, this is my solution:

CODE --> vb

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources