Selection of duplicate surfaces

Hello all,

This is my first post on NX Journaling. Let me start by saying that I love the site. I have been through all the tutorials and do have some programming knowledge, but I still feel like a newborn when it comes to Journaling in NX. That being said, here's my question...

Is it possible to write a Journal file that would select all duplicate sheet bodies in a single part file and place them on layer 255 regardless of current color or layer? In other words, I want to leave only 1 sheet bodie of each duplicate set on the original layers and move all copies to layer 255.

Let me explain further incase that's not clear. The company I work for has had many issues in the past with NX files that, for whatever reason, would have multiple sheet bodies occupying the same space. The files we deal with daily can have anywhere from 5,000 sheet bodies to 100,000 sheet bodies. Once you get to 50,000 sheet bodies in a file it makes everything slow down tremendously. Usually when a file comes in at 50K plus, its because there was an error in the handling of the file. Double or triple imports performed or geometry links from multiple versions of the same file are a few causes of this. Regardless...once the parameters are removed and the sheet bodies are there, there is no quick way that I have found to identify, select, and move all the extras to a different layer for further review.

Please let me know if any of this is unclear. I look forward to any assistance you all may be able to provide.

Regards,
Singsonite

What a boring, tedious, thankless job - sounds like great work to hand off to a journal!

I see no reason why a journal couldn't do it, we'll just need to formulate a method of comparing 2 surfaces to each other... I don't know of an out of the box command to do so.

What is your current method of finding these duplicate surfaces, is it just a visual inspection, or do you run certain commands to make sure they are duplicates?

I love that your optimistic about this! Gives me hope that I will not have to spend the next 10 years performing the same operation I did for the last 10.

Current method of removing unwanted surfaces is to use the edit object display command -> select all surfaces on a single layer -> then deselect 1 sheet body at a time until I get a complete single layer.

If their are over 2000 surfaces on a single layer, then I would move the surfaces to a "dump layer" before moving a single set of sheet bodies (no duplicates) back to the original layer.

Thank you again for your assistance.

Singsonite

For anyone else interested, we did get some working code together. I may post it up in the 'journals' section at a later date, I'd like Singsonite to use it for a while to find any potential bugs/problems first!

I've been using this code now for over a year and a half in NX6. This has been one of our most useful tools in minimizing file size and removing unwanted surfaces. Unfortunately, my company has upgraded to NX8.5 and the Journal no longer works. It doesn't throw any errors, but it no longer moves the duplicate surfaces to layer 254. I'm guessing the UF code used there is now obsolete.

Singsonite

I'll check over the code to see if there were any changes in NX 8.5 that affected functionality.

On your end, you'll want to make sure you have the .NET framework version 4 installed. NX 7.5 (and possibly NX 6) used v2 of the framework, but NX 8.5 uses v4 (you can install both on the same machine).

> I'm guessing the UF code used there is now obsolete.

That shouldn't happen. Siemens' has pretty strict policies about obsoleting (or even changing the behaviour of) NX/Open functions. If you think something has changed, you should report is as a bug.

I ran a test in NX 8.5 on a small part; the code worked correctly.

My best guess right now is that you need to install the .NET framework version 4.