albates1972
Automotive
- Feb 10, 2010
- 44
I was needing help in revising a Journal file to export out our PDF files. I don’t think it will be too difficult to revise my current program. I am placing the code that I think will take care of this along with the entire Journal in case it's needed.
Currently this program will export UG file
( ex. e1234567_a-abwip.prt ) into a PDF named ( ex. e1234567_a.pdf )
( ex. e1234567_b-abwip.prt ) into a PDF named ( ex. e1234567_b.pdf )
I need this program to create a PDF named
(ex. E1234567A00_1.tif ).
So I need capital letters along with "00_1" added to the end everytime. The "A" is the revision also.
__________________________________________________________________
'currentFile = GetFilePath() & GetFileName() & ".prt"
currentPath = GetFilePath()
currentFile = GetFileName()
if LCase(Right(currentFile, 3)) = "wip" then
exportFile = Left(currentFile, Len(currentFile) - 6)
else
exportFile = currentFile
end if
'msgbox("Export file: " & exportFile)
'msgbox("current file: " & currentFile)
__________________________________________________________________
**The (- 6) above strips off " -abwip " from the examples above.
Thank you,
Allen
Current version: NX 5.0.4.1
Currently this program will export UG file
( ex. e1234567_a-abwip.prt ) into a PDF named ( ex. e1234567_a.pdf )
( ex. e1234567_b-abwip.prt ) into a PDF named ( ex. e1234567_b.pdf )
I need this program to create a PDF named
(ex. E1234567A00_1.tif ).
So I need capital letters along with "00_1" added to the end everytime. The "A" is the revision also.
__________________________________________________________________
'currentFile = GetFilePath() & GetFileName() & ".prt"
currentPath = GetFilePath()
currentFile = GetFileName()
if LCase(Right(currentFile, 3)) = "wip" then
exportFile = Left(currentFile, Len(currentFile) - 6)
else
exportFile = currentFile
end if
'msgbox("Export file: " & exportFile)
'msgbox("current file: " & currentFile)
__________________________________________________________________
**The (- 6) above strips off " -abwip " from the examples above.
Thank you,
Allen
Current version: NX 5.0.4.1