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!

Journal code help

Status
Not open for further replies.

albates1972

Automotive
Joined
Feb 10, 2010
Messages
44
Location
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
 
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.

Part and Inventory Search

Sponsor

Back
Top