Journal to automate pdf export
Journal to automate pdf export
(OP)
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?
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?





RE: Journal to automate pdf export
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?
RE: Journal to automate pdf export
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
RE: Journal to automate pdf export
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
RE: Journal to automate pdf export
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.
RE: Journal to automate pdf export
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
RE: Journal to automate pdf export
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
RE: Journal to automate pdf export
Frank Swinkels