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!

Extracting full file path into drawing

Status
Not open for further replies.

DieMan44

Mechanical
Joined
Sep 16, 2004
Messages
183
Location
US
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.
 
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!

 
Try 'workPart.FullPath'. That should return a string containing the work part file's path.
 
That's exactly what I was looking for. Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top