Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Journal to automate pdf export

Status
Not open for further replies.

JEFJO

Industrial
Apr 1, 2011
3
I have found a journal created by cowski to automate the export of drawings to pfd.
I have changed the code a bit to export each drawing to a separate pdf, but when I play the journal it only creates a pdf of the last drawing.

What do I need to change to export each drawing to a separate pdf?
 
Replies continue below

Recommended for you

I have found the problem:
In our drawingnames their was a '/' which is not tolerated in a file name. When I changed the drawingname by replacing '/' with '_' it worked fine. But I have an additional question:
The journal exports each drawing to a pdf, can I add a kind of selection box which allows me to select which drawings I want to export?
 
Hi JEFJO,

There should be a possibility to call a C-wrapper function, which will create a very simple dialog with a single column of buttons, which you can label with your drawing sheet names. In addition, you can plot each drawing seperately.

I'll take a look at your code. By the way, which NX version are we dealing with here?

Marc
NX Software Developer
 
HI JEFJO,

I just took a quick look at your code. A quick guess is that you have to activate (i.e. open) each sheet before you print it, because I think that the PDF printer only prints out the currently active sheet... but that's just a hunch.

Will get back to you when I run your code.

Marc
NX Software Developer
 
Hi MarckyMON,

I am running Nx 7.5. When you run the code normaly a pdf should be created for each sheet.

I have changed the code a bit and now it only creates a pdf of the currently opened sheet. (This is in fact what I wanted.)
If I could add a selction box to choose which sheet I want to export it would be perfect.

 
 http://files.engineering.com/getfile.aspx?folder=ad3f0696-c6b5-43b6-b9de-182f9cc9cc57&file=export_pdf6.vb
Hello
Does anyone have a way to batch export PDF files from all drawings in an assembly or folder? Any help here would be greatly appreciated.

Thanks,
James
 
Attached is a program for creating PDF files from NX drawing sheets. For an assembly one needs only select the assembly top part. No allowance is included for searh directories. Any number of parts can be added.

To setup for this, place the file NXDrgToPDF.exe in any suitable directory. Next place the NX library files (located in the %UGII_ROOT_DIR%\managed directory) NXOpen.dll, NXOpen.UF.dll, NXOpen.Utilities.dll, and NXOpenUI.dll into the same directory as NXDrgToPDF.exe.

You can now execute the file from here (double click) or you can create a shortcut from it and place it on the desktop for direct execution from the desktop shortcut.

I have not allowed for changing PDF parameters. This is possible but should be done on an as needed basis.

Regards

Frank Swinkels
 
 http://files.engineering.com/getfile.aspx?folder=e6cb18df-d290-4021-a8a2-201f43c81121&file=NXDrgToPDF.zip
One additional requirement to execute the PDF creation program. It is necessary to include the UGII_ROOT_Dir path in the Path environment variable.

Frank Swinkels
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor