a costumer ask me about how can they know what file is Assembly and what are componentes when they receive from their Costumers/Suppliers files .prt (NX) but without Open the files in NX.
They receive lot of files and it seems is not easy know what the Assy(Top Level Assembly) is only through the name or reference that they receive.
I though editing files using text editor could be a way , but I tried and I can not determine what kind of file is (I mean if the file is Assembly or component).
Thanks in advanced for your help...!
Solved! Go to Solution.
There is a utility in the UGII folder named 'ug_inspect.exe' Run this program with the '-help' modifier and it will give you a listing of various options and settings. However, if you just run the utility giving it only the name of the part file (include the full path name) you'll get a series of items in a report. And while there is not explicit item that will state whether the part is an Assembly or not, there is one line which states:
Definitely contains no components?
If this this is reported as 'TRUE' then that part file is NOT an Assembly. However if it's reported as 'FALSE', then it IS an Assembly (I know, the reporting logic is a bit backwards but it does the job is you read the output carefully).
If you're going to do this a lot, you could write a simple VB program that could call this utility while asking you for the file name and then check for the value reported for the output line mentioned about.
Another option is to open only one of the parts and then do a Where Used Report.
Menu -> Information -> Assemblies -> Where used. Do an all levels Report
It will report all parent assemblies of the opened part in a hierarchical manner.
This is the easiest way to find the top assembly node.
To me, the easiest utility to use for this is "ugpc.exe" (same folder as ug_inspect)
Will list components if it is an assembly, no components if it is not an assembly
"ugpc -h " to get listing of arguments
C:\Siemens\NX100\UGII>ugpc "G:\xxx.prt" G:\xxx.prt Note: file G:\xxx.prt has no assembly structure
C:\Siemens\NX100\UGII>ugpc "G:\aaa.prt" G:\aaa.prt G:\bbb.prt G:\ccc.prt G:\ddd.prt G:\eee.prt
Production: NX10.0.3.5 MP5 + patch/TC11.2
Apparently I've turned into a gearhead
OK, here's something that I think is a bit closer to what you were looking for.
Download the attached .zip file extract the .bat file. Now to make this easy to use, place the .bat file wherever you would like it to, then create a 'shortcut' and place it on your desktop.
Now when you want to know whether a group of part file are either Assemblies or Piece Parts, open an explorer window and drag the folder of interest and drop it on the 'shortcut' that you created above. What will happen that this utility will look at all of the .prt files in the folder and will process them (you'll be able to see the progress in the command window that will open automatically) and when finished will open a text file on your desktop that will list all of the part files in the folder and will indicate whether it's an Assembly or a Piece Part file. Once you learn which are the Assemblies and if you wanted to know what Components are part of the Assembly, go and look at what Ken posted and follow his instructions there.
To see how this utility works, open the .bat file using a text editor and review the comment section at the start of the file.
Anyway, I hope this helps make your inspection task a bit easier.