×
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

file size of nx partfile > native & teamcenter

file size of nx partfile > native & teamcenter

file size of nx partfile > native & teamcenter

(OP)
Hi -

Have anyone here tried to figure out - if it should be possible to "extract" the file size of current workpart in NX > managed mode?
looking for this possibility - either to do it in VB.NET or Knowledge Fusion....
But seem's like I have some challenges regarding finding some classes of functions.
Tried look into NXOpen.PDM Namespace and UFUgmgr Class - without finding some interesting.

I did succeed in a nx native environment - see code snippet .
But how to do this in a nx-teamcenter session ??

Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As Session = Session.GetSession()
Dim theUI As UI = UI.GetUI()
Dim workPart As Part = theSession.Parts.Work
dim currentFilePath as string = workpart.fullpath

Dim infoReader As System.IO.FileInfo
infoReader = My.Computer.FileSystem.GetFileInfo(currentFilePath)
MsgBox("File is " & (((infoReader.Length)/1024)) & " KB.")

End Sub
End Module

regards lklo

RE: file size of nx partfile > native & teamcenter

Why on earth do you want to do this ?!?

I assume that you know that you can see the file size if you use "Named References" on the NX dataset in Teamcenter. ?


Regards,
Tomas

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