Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

PDF Export Journal 1

Status
Not open for further replies.

hurley710

Automotive
Feb 4, 2009
59
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.
 
Replies continue below

Recommended for you

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
 
Cowski,

Thanks for your help! I figured it was a simple naming convention I was missing. You always pull through!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor