×
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

PDF Export Journal

PDF Export Journal

PDF Export Journal

(OP)
Hello All,

I've written NX Journals to export the current drawing sheet as a .pdf with no problem.

dim shtName as string = workPart.DrawingSheets().CurrentDrawingSheet.Name()
Dim sheets1(0) As NXObject
Dim drawingSheet1 As Drawings.DrawingSheet = CType(workPart.DrawingSheets.FindObject(shtName),
Drawings.DrawingSheet)
sheets1(0) = drawingSheet1
printPDFBuilder1.SourceBuilder.SetSheets(sheets1)


I can easily do it also as two sheets with no problem.

Dim sheets1(1) As NXObject
Dim drawingSheet1 As Drawings.DrawingSheet = CType(workPart.DrawingSheets.FindObject("SHT1"), Drawings.DrawingSheet)

sheets1(0) = drawingSheet1
Dim drawingSheet2 As Drawings.DrawingSheet = CType(workPart.DrawingSheets.FindObject("SHT2"), Drawings.DrawingSheet)

sheets1(1) = drawingSheet2
printPDFBuilder1.SourceBuilder.SetSheets(sheets1)


Unfortunately, my company creates drawings interchangeably, as both one sheets or two. It'd be nice to do this all as one journal. I'd like to create .pdf export journal that will check how many sheets are in the workpart and then export those to the set destination. Can anyone give any help on this? Thanks so much in advance.

RE: PDF Export Journal

You can pass all the drawing sheets to the sourcebuilder in one shot, no need to pass them in one at a time.

The following line will add all the drawing sheets to the sourcebuilder; you should probably check that there is at least 1 sheet before doing this...

CODE

printPDFBuilder1.SourceBuilder.SetSheets(workPart.DrawingSheets.ToArray) 

www.nxjournaling.com

RE: PDF Export Journal

(OP)
Cowski,

Thanks for your help! I figured it was a simple naming convention I was missing. You always pull through!

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