Currently, we export drawings into an Electronic Data Management System using GRIP. Drawings are released into .hgl format. Is there a way to automate an export of these drawings as .pdf?
I would look at using a journal. What exactly would you like to happen? Do you have multi-sheet drawings? If so, do you want these as multiple pdf files or not? Do you need to import these into another application?
Yes, at times, there are multiple sheets in the file. But for the most part, this could be done individually as separate PDF's. As an end result, I would like to be able to create a .pdf file of the current drawing sheet in a specified directory as easy as possible. This would be for other departments that don't use CAD to be able to view our drawings.
Journal definitely seems like a good option to look into. One thing I need to figure out is if I can set it up to prompt for the saved file name and destination directory. If I could set it up to be smart, based on the part number attribute, I'd be golden.
Here's a copy and paste job from the drawing to dxf journal I posted earlier this week. It will export a .pdf file to the same directory as the original file; if you give some more info we can adapt it to your needs.
It was created on NX6, but I'm fairly confident it will run on NX5. Give it a shot.
First off, thank you for everything. You've already opened the door to a lot of ideas I haven't really thought about. I believe all I need is to create a journal that looks at the value of a particular part attribute (in my case, its named DRAWING_NUMBER) and save a .pdf as that value. I was incorrect earlier when I said I would need to vary its destination. All .pdf's could be saved in the same directory (which will not be the same directory as the file. We actually use Teamcenter).
Recording a journal is a great place to start. From there you have to generalize it a little, otherwise it looks for the specific objects you picked when you recorded the journal.
I have another journal that outputs a parasolid, I'd be glad to get you started. I got some help for it on this forum, if you search for 'journal output parasolid' you will probably find the code. I'm a bit tied up this morning, but I should be able to post something more useful this afternoon or tomorrow.
Do you have multiple sheets and solid bodies in your file that you want output as parasolid, STEP, and IGES? If so, do you want all of them to be output or only 1 specific solid body?
Just as fair warning, I have zero experience with Journals, VB, etc. I suspect this may be beyond my usual "dive in and hack my way thru it" way of doing things
Some drawing files will have multiple sheets. Model files should only have one solid that should be exported, but I can't guarantee someone doesn't have reference solids in the file. Because of this, I'm wondering if rather than automating the process, I should look to make it a 'guided process', ie run the journal, but get prompted to select the solid, etc. It wouldn't speed the process, but the hand-holding approach would ensure that all of the required files are created.
Also, we're using Teamcenter, so to have the files saved into TC automatically would be a bonus.
-Dave
Everything should be designed as simple as possible, but not simpler.
Gunman,
Here is a starting point for you. A few words of warning are in order:
1) if your drawings use the 'master model' approach, the STEP and IGES export won't work. Apparently, STEP and IGES do not see a component as a valid entity to export, but the parasolid export works just fine.
2) you will have to open the journal file and edit the location of your STEP and IGES settings files. Look for the lines "Const stepSettingsFile as string =..." and "Const igesSettingsFile as string = ..." near the beginning of the file.
3) I am not running teamcenter, so I do not know how to save files into TC. Perhaps someone else on the forum can help you with that aspect.
4) The journal has worked in my limited testing, but I do not guarantee it to be bug free. Please post any problems you have with it.
cowski,
My journal writing has been a success! My only snag is I still am not sure how to get it to point to an attribute. Is it possible to point to an attribute name to save as the output .pdf? I would like the .pdf to be saved as the value of the attribute "PART_NUMBER"
I looked at your version and copied some over to mine to try. When trying to run it, I came up with a couple errors. I've attached my journal and a pic of the errors. Any idea?
Cowski,
both your vb files are awesome, but could i trouble you to modify the for me (i've tried)
I want them to be named from the component (master model), not the drawing file, and i'd like them to output to a specific directory, eg. X\pdf's.
Help appreciated...