×
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

UG PDF AND HPGL AUTOMATED EXPORT

UG PDF AND HPGL AUTOMATED EXPORT

UG PDF AND HPGL AUTOMATED EXPORT

(OP)
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,

RE: UG PDF AND HPGL AUTOMATED EXPORT

Start with this thread.

http://www.eng-tips.com/viewthread.cfm?qid=373908

And use the search function on pdf export, there are a lot of threads with solutions. Especially the trheads from cowski, a must read.

Best regards,

Michadl.

NX7.5.4.4 + TC Unified 8.3
Win 7 64 bit



RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
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.

RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
Cowski, can you please help.. I need your expertise for most of the things.

RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
Thank you very much. Mick

Can you please get me journal for pdf that too in color and also for HPGL format exporting

RE: UG PDF AND HPGL AUTOMATED EXPORT

In any of the PDF code that I have posted, search for the line:

CODE

printPDFBuilder1.Colors = PrintPDFBuilder.Color.BlackOnWhite 

and change the color option to one of the below:

  • AsDisplayed
  • PartColors
  • CustomPalette
  • BlackOnWhite
  • LegacyColors
  • ColorsByWidth

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

www.nxjournaling.com

RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
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...!

RE: UG PDF AND HPGL AUTOMATED EXPORT

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

RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
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.

RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
Cowski,

Awaiting your positive response,

RE: UG PDF AND HPGL AUTOMATED EXPORT

> 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.

RE: UG PDF AND HPGL AUTOMATED EXPORT

  1. You are in luck, I recently wrote a journal that will export pdf files for all the NX parts in a chosen directory
  2. 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.
  3. 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.
If you get stuck, post with specific questions and I'll be glad to help out if/when I can.

www.nxjournaling.com

RE: UG PDF AND HPGL AUTOMATED EXPORT

(OP)
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.

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