×
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

Extracting full file path into drawing

Extracting full file path into drawing

Extracting full file path into drawing

(OP)
Hi. I'm creating new drawing templetes for NX5. I have everything set up except for an automated text to get the full file path from our network. Is there something simular to <W@$SH_SHEET_SCALE_DENOMINATOR> but gets the files path.

RE: Extracting full file path into drawing

(OP)
John's grip file produced exactly what I wanted. However, I can't seem to figure out how to get it to activate from a button I tried to make. I have configured another button to populate some of the fields in my tile block. See example below:


' NX 4.0.0.25
' Journal created by Henry on Tue Mar 21 10:57:55 2006 FLE Standard Time
'
Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main

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

Dim displayPart As Part = theSession.Parts.Display

' ----------------------------------------------
'   Menu: File->Properties
' ----------------------------------------------
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Edit Properties")

Dim TimeNote As DateTime
TimeNote = System.DateTime.Now()
    Dim TimeNoteString as String() = TimeNote.GetDateTimeFormats()

workPart.SetAttribute("DATE", TimeNoteString(1))
theSession.Parts.Work.SetAttribute("FILENAME",theSession.Parts.Work.Leaf)


' ----------------------------------------------
'   Menu: Tools->Journal->Stop
' ----------------------------------------------

End Sub
End Module

What I would like to know is if I can get the code to either activate John's grip, or the code that will do what John's grip does. Thanks!

 

RE: Extracting full file path into drawing

Try 'workPart.FullPath'. That should return a string containing the work part file's path.

RE: Extracting full file path into drawing

(OP)
That's exactly what I was looking for. Thanks!!!

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