×
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

BATCH OUT PDF FILES ?

BATCH OUT PDF FILES ?

BATCH OUT PDF FILES ?

(OP)
Hello
Does anyone know if it's possible to "batch" export/print PDF files of all NX6 drawings in an assembly or folder?

James

RE: BATCH OUT PDF FILES ?

Possible, probably. There used to be a batch program that would do it in the pre-NX days but it was written for GRIP and used VMS DCL for the OS side of the program.
 

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: BATCH OUT PDF FILES ?

There have been several programs written recently by customer to do just that, and at least one of them is now participating in this forum, but you will have to wait until the sun raises down in 'OZ' before he will see this inquiry.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: BATCH OUT PDF FILES ?

(OP)
I'll be happy to wait for Mr. OZy :)

Thanks,
James

RE: BATCH OUT PDF FILES ?

Before I start on such a program attached is a windows program that allows one to edit NX part attributes.  Place the file FileAttributes.exe in your UGII\managed directory.  Then open the NX command window and execute FileAttributes.  The program allows you to edit part attributes without opening them in a NX session.

If this works for you I propose a program that would allow you to select a directory or an assembly.  The program would list all the parts which it would cycle through showing in turn the drawing sheets (as a list) which are being worked on to create the PDF files.  Before programming I would need some more info regarding location and pdf file naming.

Frank Swinkels

RE: BATCH OUT PDF FILES ?

(OP)
FrankSwinks,
Thanks for the attachment.
I placed "FileAttributes.exe" in my "UGII" folder & double clicked it. Immediately Windows came up with a error message "exattributes" had quit working. I'm running a 64bit OS, could that be the problem?

James

RE: BATCH OUT PDF FILES ?

Batch export of pdf files looks like an interesting problem. I'd like to work on it, but it will be sometime next week at the earliest that I'll be able to contribute - I'm currently up to my eyeballs in data migration.

p.s. I'm not the wizard of OZ that John alluded to, so this may be taken care of by someone more experienced before I'm even able to start looking at it. In which case I look forward to seeing the solution.

RE: BATCH OUT PDF FILES ?

(OP)
Thanks Mr. OZ ... I mean cowski. I do appreciate the effort & experience you guy are sharing.

James

RE: BATCH OUT PDF FILES ?

jkcone

You need to place it in the managed sub directory of UGII.  Also you now need to open a NX command line window.  It should open to .../UGII/managed dir.  Now you can execute FileAttribute.exe from the command window. It is compiled for NX7.5 64bit.

Frank Swinkels (in OZ)

RE: BATCH OUT PDF FILES ?

(OP)
Hi Frank
I moved fileattributes.exe to the managed directory (like I was supposed to in the first place) & lunched it from the NX command line window as you instructed. I still get the Windows error message "exattributes has stopped working". You mentioned it was compiled for NX7.5 64bit. I'm running NX6 32bit. Do you think that could be my problem?

James

RE: BATCH OUT PDF FILES ?

That is the problem. Compiled programs must be run in the system for which they were compiled for. NX libraries may have changed between NX6 and NX7.5. Also the version of compiler may have changed.
 

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: BATCH OUT PDF FILES ?

(OP)
Frank / looslib,
I know very little about this. What program was used to "compile' "fileattributes.exe".

James

RE: BATCH OUT PDF FILES ?

I can only make a guess, but that would be MS Visual Studio.
The program is either written in C or C++.
It is hen linked with object libraries that come with each version of NX.
 

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: BATCH OUT PDF FILES ?

(OP)
Thanks for the info looslib,

James

RE: BATCH OUT PDF FILES ?

(OP)
Thanks Frank for taking the time to re-compile this for NX6.
I afraid though I'm getting the same error with this file as well.
A couple thinks I though might be the problem. First I'm running NX6 32bit. Was it compiled for 64 or 32 bit NX6? Second when I start the NX command line window the first line says "MSVCDir" is not configured so I change directory to the "managed" directory & launch fileattributesnx6.exe from there. Could the MSVCDir
 not being set cause a problem?

James

RE: BATCH OUT PDF FILES ?

James

It is not necessary to have MSVCDir set.  I set up an additional command line window configured to totally ignore everything except command line window access to NX.

I have NX6 located at C:\ugs\NX6

The command line dialog properties are:

Target: C:\WINDOWS\system32\cmd.exe /k C:\ugs\NX6\UGII\ugiicmd.bat "C:\ugs\NX6"

Start in: C:\ugs\NX6\UGII\managed

In C:\ugs\NX6\UGII\ugiicmd.bat I have remarked out everything except:

set base=%1
set base_dir=%base:"=%
set UGII_BASE_DIR=%base_dir%
set UGII_ROOT_DIR=%base_dir%\UGII\
set PATH=%base_dir%\ugii;%PATH%

That is %1 becomes C:\ugs\NX6

This works for me when I run FileAttributesNX6 from the command line prompt.

Just in case, I have recompiled with the 32 bit  library files for NX6.  I have also signed the program.  Hope this is enough information to now have it work for you.

Frank

RE: BATCH OUT PDF FILES ?

jkcone,

Are you still working on this or has it been taken care of?

I may have some time this week to work on it if needed.

RE: BATCH OUT PDF FILES ?

I have not done any more on this.  I was waiting on a response regarding the windows attributes edit program.  If my approach is of no use then I see no value of doing work on the pdf program.

Frank Swinkels

RE: BATCH OUT PDF FILES ?

(OP)
Thanks guys for your continued help.

Frank, I realy wanted to see how your FileAttributesNX6.exe worked but I was unable to get it to work. Probably due to my lack of computer expertise. But I don't understand what this program has to do with a batch pdf export program. What am I missing?

Cowski, I've made no headway on a pdf batch export program. Any assistance would be greatly appreciated. I'd offer to help but I don't know where to start.

Thanks again, looking forward to your help.
James

RE: BATCH OUT PDF FILES ?

James,

What I planned was to use a similar type of program.  NX has a number of standalone program that runs in the operating system.  My only difference is that I add a dialog interface instead of using command line switches.  If, however, you cannot run any such programs I see no value with proceding with any programming for your requirements.  

What I had in mind was to have a dialog similar to the attached image (but different).  A user would select either a directory or an assembly part. The NX parts would be displayed as a list.  If required some naming relationship for the PDF files could be selected/defined.  Also a directory for the output files could be selected/created.  Finally some form of progress information would, I think, be useful.

Frank Swinkels

 

RE: BATCH OUT PDF FILES ?

(OP)
Frank
Thanks very much for your continued help on the matter.

I like the sound of your proposal & the look of your interface.

Let me give the "FileAttributesNX6.exe" another try using your Feb. 25th instructions. I'll let you know the results as soon as I can.

Later,
James

RE: BATCH OUT PDF FILES ?

(OP)
Frank,
I've tried a number of times using the instructions from the Feb 25 post but still get the same Windows error as before "fileattributesnx6 has stopped working". The only guess I have is the problem is due to the difference between our install paths & or differences between our operating systems.
I'd very much like to get this program & a batch pdf program working. Do you have any other suggestions?

Thanks,
James

RE: BATCH OUT PDF FILES ?

James,

Sorry but I cannot offer any further suggestions.

Frank Swinkels

RE: BATCH OUT PDF FILES ?

(OP)
Frank
Is it possible the difference in our NX install paths is the problem?

Thanks,
James

RE: BATCH OUT PDF FILES ?

James

The install paths is not important if you use a separate command prompt shortcut.

The attached jpeg shows  a section of my desktop and the properties window.  What is important is that the target is set correct and the start in is set correct.  It is here that your correct paths are set.  You then have no conflict with your installed NX. Also included is a text file showing the lines.  You should be able to make this suitable for your system.

Finally I have also included the program again.  I have made some changes which allows the dialog to be shown more quickly.

If this does not do it for you I am out of any ideas.

Frank Swinkels

RE: BATCH OUT PDF FILES ?

(OP)
Per the instructions above.
I've edited my command prompt to this:
Target: C:\Windows\SysWOW64\cmd.exe /k C:\Program Files (x86)\UGS\NX 6.0\ugii\ugiicmd.bat "C:\Program Files (x86)\UGS\NX 6.0\"
Start in: "C:\Program Files (x86)\UGS\NX 6.0\UGII\managed"
I've placed the latest "FileAttributesNX6.exe" file in the "managed" folder.
I double click on the command prompt & type in "FileAttributesNX6".
At this point I get the same Windows alert saying "FileAttributesNX6" has stopped working.

I feel like I'm following the instructions exactly taking into account my particular systems path.

Has anyone else ran this "FileAttributesNX6.exe" ?
If so how did you get it to work ?
I'd realy like to know what I'm doing wrong!

Thanks,
James

RE: BATCH OUT PDF FILES ?

Place double quotes for the file "C:\Program Files (x86)\UGS\NX 6.0\" name in the startup line.  One set of quotes is for beiging able to contain the spaces when reading the file name from the command prompt.  The second set of quotes are needed because ugiicmd.bat  uses this file name also as a switch.  You therefore need to have it look like ""C:\Program Files (x86)\UGS\NX 6.0\"".

Frank Swinkels

RE: BATCH OUT PDF FILES ?

Here is a link that helps you to edit NX part file attributes outside NX (without opening NX)
Read "Exposing NX attributes to Windows Explorer" article from this link :
http://nxway.blogspot.com/
(Please check if this trick works for NX6 and NX7.5 also)

Agreed that PartAttributes.exe is much more capable of doing the task, but above link is worth reading.

RE: BATCH OUT PDF FILES ?

(OP)
Thanks man2007 for the info, I'll check it out.

Have you ran any of the "FileAttributes.exe" programs attached to earlier posts in this thread?

James

RE: BATCH OUT PDF FILES ?

I have not yet tried it, since the file is blocked here in our company, as per IT Policy. Will give a try once I download it and send it to my company ID :)

RE: BATCH OUT PDF FILES ?

Hi,

What you could do is develop an external NX program (using C, C++, .NET, whatever you are comfortable with) which would print out the drawings you need as postscript (PS), using a printer that you would need to set up. You can then use GhostScript to generate a PDF from the postscript.

I've developed a very similar program, but it is launched internally (in an interactive NX session).

Marc
NX Software Developer
 

RE: BATCH OUT PDF FILES ?

Sorry for the extremely late reply; after a change in employers I totally forgot about this thread. One of the other similar threads jogged my memory but then I ran into a bug I had trouble tracking down. Killed it thanks to a BBS user named 'sgann'.

Anyway, here is a basic journal that will let you select a directory and export pdf's of all the files (those that have drawing sheets anyway).

Consider it as a foundation for what you are trying to do and customize it as needed.

 

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