×
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

Journal code help

Journal code help

Journal code help

(OP)
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

RE: Journal code help

Quote (albates1972):

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?

RE: Journal code help

(OP)
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

RE: Journal code help

(OP)
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

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