If you have an issue with loading a NX part file or want information about it without opening it in NX
Located in the “UGII_BASE_DIR/UGII/” directory lies an application “ug_inspect.exe“. When you run this application in a command prompt with a location and a part file, it returns more information about the file then you can ever get from within NX. This application has been around in NX for as long as I can remember but it still is not known widely.
Example: note: this is a single line, the web page shows the text wrapped
output from the “ug_inspect.exe -help”:
Since you can run this against individual files easily, but many files are teadious. I’ve created a batch script that you drop this script into a directory where NX parts are and run the script. It will then create a subdirectory with an output text file of each file it finds. Edit the script file to do more checks. Currently only the general ug_inspect is run. All the other options are commented out.
The general utility output will tell you a lot about the nx part file. The known corruptions is the best for quickly determining if there is a problem before trying to open in NX.
Output
Some of the information it returns is:
Download
Download the ug_inspect.bat file
NX3 has a directory of sample applications
If you need an application to compare drawings, update all drawings, update all features, update all smart models, and about 25 other macro applications look no further then right in the UGII_BASE_DIR. These sample applications are located at: UGII_BASE_DIR/UGSAMPLES
These applications are very usefull not just for what they do but the outline on how to build on the existing code and do other tasks. For example the update all features should be run each time your site is migrating from one version of NX to another. This should happen well in advance of the migration to verify if there are going to be any issues in production. Then once you have the files that migrate correctly and refile should take place after you have gone into production. That way all your files are at the current version, you know they will migrate, you won’t be left trying to upgrade a part on the designers machine hoping it works, and if in a few years you want to open an very old file the version jump will be less. You should be able to open any version of NX in a newer version but if there is a problem it will be very difficult to fix if the original version is no longer installed.
Each new version of NX they checking of the parts get better and better, the next version of NX may find an issue with your current of NX. So if you do a dry run of all your parts in a update all features you can have a piece of mind knowing that any production issues will be less if at all.
The PlmExchange.net forums are up and running. Join the PLM community and post questions, solutions, etc..
Link to the forums: forum.plmexchange.net
NX3 ships with many sample NX/Open applicatons
The sample applications are located at: UGII_BASE_DIR/UGOPEN/SampleNXOpenApplications, default location is: C:\Program Files\UGS\NX 3.0\UGOPEN\SampleNXOpenApplications
These sample applications are mostly .Net based technology. They use either VB (visual basic) .Net or C# (C Sharp) .Net, with a couple of applications that are C++ based in NX/Open.
c# samples:
vb samples:
c++ (C Plus Plus) samples:
As you can see the majority of sample applications are written in vb (visual basic). Probably because that is the target audience for getting quick applications up and running. For C++ programmers and C# programmers they probably assume they’ll figure it out anyways. That is just a guess. Regardless of they type of programmer you are, which language you previously worked on you’ll see examples on how to use the NX/Open api namespaces to build your applications.
There will be another post of a step by step on creating a NX/Open application wired to a winform dialog.