Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Journal code help

Status
Not open for further replies.

albates1972

Automotive
Feb 10, 2010
44
0
0
US
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
 
Replies continue below

Recommended for you

albates1972 said:
I need this program to create a PDF named
(ex. E1234567A00_1.tif ).
You want a pdf file with a .tif extension? I hope that is a typo.

Is the revision saved as an attribute in your file?
 
That was a typo, sorry. I need a PDF file.

***********************************
I need this program to create a PDF named(ex. E1234567A00_1.pdf ).
***********************************

There are no attributes created for each revision file.

Thanks,

Allen

Current version: NX 5.0.4.1
 
That works.

I created duplicate files with different scales. That program will save our group a lot of time of manually renaming files.

Thank you,

Allen

Current version: NX 5.0.4.1
 
Status
Not open for further replies.
Back
Top