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!

UG PDF AND HPGL AUTOMATED EXPORT 1

Status
Not open for further replies.

try100

Mechanical
Dec 4, 2014
8
Hi,

Can you please help me in automating the PDF (color as is) and HPGL from Unigraphics NX8.5.

I will be very thankful if it can be provided as soon as possible. Also I am new to macros and Journal.

Please provide me the procedure in UG to incorporate the same. Thanks in Advance,
 
Replies continue below

Recommended for you

HI Micky,

Thanks, But i Tried those journals but I am getting only pdf that too in black and white.
Any shortcuts to run Journal.
Instead of going to Tools-->Journal-->Play-->select vb--> Run.
 
Cowski, can you please help.. I need your expertise for most of the things.
 
Thank you very much. Mick

Can you please get me journal for pdf that too in color and also for HPGL format exporting
 
In any of the PDF code that I have posted, search for the line:

Code:
printPDFBuilder1.Colors = PrintPDFBuilder.Color.[highlight #FCE94F]BlackOnWhite[/highlight]

and change the color option to one of the below:

[ul]
[li]AsDisplayed[/li]
[li]PartColors[/li]
[li]CustomPalette[/li]
[li]BlackOnWhite[/li]
[li]LegacyColors[/li]
[li]ColorsByWidth[/li]
[/ul]


Unfortunately, I don't have any example code to get the HPGL output.

www.nxjournaling.com
 
Hi Cowski,

Thank you very much..! I am great fan of yours after reading multiple threads.

Quick help: Can you please help me for changing name of the file as per my wish. since it is exported as same as name of file
But I need to add some text before and after the name of the file.

Also, I need to know is there any Journal or macros for the repetitive work. I have same kind of work which will be repeated for 500 drawings. for example I will work on one UG file which has assembly and after completing it will be saved and then that UG file will be replaced using replace component with another component and it is worked. Like that I am following for creating sketches and modifying the layers which is default for all the drawings.

Please respond so that I will be grateful...!
 
I made a small update to the PdfExporter class to make it easier to assign a custom name to the output pdf file. The module "change_output_file_name" demonstrates its use; you can make any changes that you need to in the module's Sub Main(), but you shouldn't need to make any changes to the class portion of the code.

example journal

www.nxjournaling.com
 
Hi Cowski,
Thank you very much.

Sorry for bothering you..! Some cases i have can you please do the needful by providing journals and save my time
Ex case 1. I have ten files .prt in the folder. i need pdf of those files in the same folder. Is there any journal and macro to extract this by opening one file instaed opening all the files.
Case 2. I need pdf by having some layer on and having some layer off in one file. i.e two pdfs for one file Is there any macro or journal for this (instead of manual layer off).
Case 3. I need to know is there any Journal or macros for the repetitive work. I have same kind of work which will be repeated for 500 drawings. for example I will work on one UG file which has assembly and after completing it will be saved and then that UG file will be replaced using replace component with another component and it is worked. Like that I am following for creating sketches and modifying the layers which is default for all the drawings.
 
Cowski,

Awaiting your positive response,
 
> Cowski,
> Awaiting your positive response

Just a thought ... if you want a guy to do work for you, on your schedule, whenever you request it, and you want the privilege of nagging him when he doesn't deliver immediately, then maybe you should consider hiring someone.
 
[ol 1]
[li]You are in luck, I recently wrote a journal that will export pdf files for all the NX parts in a chosen directory[/li]
[li]You will need to add some code to set your layers as desired before exporting the pdf file. Recording a journal is a good way to quickly get working code and learn the NXOpen API syntax.[/li]
[li]Custom code will need to be written for your "repetitive work". I suggest starting by writing down the steps currently used to perform this work in interactive NX. Break down the steps into small, logical chunks. You can then record journals for each small chunk (e.g. move all sketches to layer 12), then combine the journals to accomplish all the steps.[/li]
[/ol]

If you get stuck, post with specific questions and I'll be glad to help out if/when I can.

www.nxjournaling.com
 
Hi Cowski,

After a long time I am looking for your help.

I have tried your VB running through Journal for exporting pdf. Its working good. Thank you so much for that. But I am facing two difficulties

1. Not able to stop pdf export in between the creation, For example, if i have some 100 files and start creating a .pdf by mapping export folder, suddenly if i think to stop the export pdf i cant - can you please help.

2. The output files are having different naming convention for example if i need to export 12352123_1 to pdf, I will be getting output file as 12352123_1_1.pdf i.e _1 is duplicating once. - Can you please help.

Awaiting your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor