Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations The Obturator on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assembly loading different parts with same part name? 3

Status
Not open for further replies.

CNSZU

Mechanical
Sep 2, 2005
318
Hello,

Someone sends me a STEP assembly which I add to my main assembly. I proceed to modify some of the parts in this assembly. Later, I receive another STEP assembly which I add to my main assembly next to the old assembly. To my shock and horror, some parts in the new assembly are automatically replaced with the parts I modified previously. It turns out those parts in the new assembly have the same part names as in the old assembly. I guess NX can't make a distinction between them and simply loads the old parts instead of the new parts.

This is not a problem in proe, as it will automatically add a "_1" to the end of any new parts which have the same name as those already in the assembly, thereby ensuring that all new parts get loaded properly. What is the correct procedure in NX? Should I first make a clone of every assembly I receive and add a unique suffix to every part name myself? Or is there a more clever method, for example having NX load two parts with the same names if they are in different folders?

NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 
Replies continue below

Recommended for you


When you import the assembly to TC do not use override revision.
 
Sorry, I use native NX, not TC.

NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 

I'm also Sorry because I meant to say 'new revision' and not 'override revision'.

But if this is in native I think its better to use different directories for
the assemblies you add and use load option as saved when loading your assembly.
 
I don't think load options is the problem. Let's say we have two folders, called A and B, both of which contain 4 parts:

folder A:
A.prt
1a.prt
2.prt
3a.prt

folder B:
B.prt
1b.prt
2.prt
3b.prt

The structure of the main assembly:

Main.prt
-A.prt
--1a.prt
--2.prt
--3a.prt
-B.prt
--1b.prt
--2.prt
--3b.prt

The problem here is that 2.prt in assembly B is replaced by 2.prt from assembly A even though they are different files with different geometry.





NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 

I want to understand if you coloring like this

folder A:
A.prt
1a.prt
2.prt colered yellow
3a.prt

folder B:
B.prt
1b.prt
2.prt colered green
3b.prt

Do 2.prt in the main_assembly have the same color

Main_assembly
A.prt
1a.prt
2.prt ==> green
3a.prt
B.prt
1b.prt
2.prt ==>green
3b.prt

If so it seems like a bug.



 

-Main_assembly
- A.prt
- - 1a.prt
- - 2.prt ==> green
- - 3a.prt
- B.prt
- - 1b.prt
- - 2.prt ==>green
- - 3b.prt

 
Yes, both would have the same color. However, i don't think it's a bug. As I said, proe solves this issue by automatically renaming the same named part by adding a "_1" suffix, but with NX it's different. I want to understand if there is a way to open both parts, or if there is a requirement in NX that every part must have a unique part name. I hope I'm explaining myself clearly enough.

NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 
From my testing NX needs unique part names and does not use the path as an id. Thus cloning the assembly to add a subfix is probably the easiest way to accomplish what you want.

 
I see, thank you.

NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 
I tryed to simulate that and NX refuse see error.

blocks_assembly_nnk8hb.jpg
 
a984928,
You have created two separate part files with the same name; this will create two part files with unique header information. NX recognizes them as separate parts and this is why you see the "not a valid version" message. To see the issue that CNSZU sees, try doing a save-as on one of the component parts (but do not rename the assembly during the save-as) or copy the component part at the OS level to a new folder and make a change to the copy. Which one opens in the assembly will depend on your load settings.

CNSZU,
NX will not load two parts with the same name into memory; it will not automatically give the files new names. I agree with petulf that cloning is probably the easiest solution.

www.nxjournaling.com
 
cowski, that's greatly appreciated. From now on, whenever I receive STEP files I'm going to add cloning with new suffix to the workflow just to be sure.

NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 
Here's how it works.

NX will when you import assign "_1" to file names IF the destination directory ( NOT the assembly) already contains a file with the same name.
Normally one performs the Import separated from working the assembly.

In regular assembly work( not stepfiles ) NX uses both the file name AND something called UID ( Unique Part Identifier) to identify the correct file for use in the assembly.
The path is stored but not used unless you set the load options to "as saved".

Many years ago, before NX started using templates, every file created got a new, unique, UID upon creation.
A UID looks like this: Tomas4.GenuineInt.1478091289.0.10000.1
The UID cannot be changed.

In The Load options, there is an option named "Allow replacement", the thing it does is if ON is ignore the UID when loading components. You will still get a warning but NX will load the wrong file with the correct name.

When NX started using templates for File- New, the UID thing got ruined because when you do a save as of a file, NX keeps the UID.
- keeping the UID is a good thing because then a "sister" to a component can be replaced without trouble. for example you can replace a M12 screw with a M10 without loosing any associativity. IF the UID matches, NX knows the file is a "sister".

Somewhere in a later version, NX development realized this problem with file -new templates and UID and corrected this such that again you get unique UIDs from file-new.

But.
When you import step files and similar, NX will use a "nullpart". - A regular partfile located in the STEP203UG of the install.
( There are two parts , step203ugnullnx110_in.prt and step203ugnullnx110_mm.prt)
Into which the step data is imported then "saved as" into a new name.
This, the same part file, is used again and again when you run an import, and since it's a save as operation, all files which originate from step203 import will have the same UID.
- And therefore NX cannot spot the difference between component_1.prt and Component_1.prt if these are imported from Step or Iges or ...

NX does have the load options mechanism to control from what directory you load the components.

Hope this helps.

Regards,
Tomas


 
Thanks Tomas, it helps.

So all files originating from STEP will have the same UID. NX will treat parts which have the same part name AND UID as if they're the same, which sometimes might not be the case. It would be nice if NX could give the user a warning if it finds multiple parts with the same part name and UID in the loading paths. Otherwise, the situation arises where the user will discover by accident, or not at all, that the part they are working on is not the part they think they're working on.

NX11.0 Win10 64bit i7-3770K 16GB QuadroK2200
 
We should write en Enhancement request to Siemens on the UID in imported files. They did fix it on File-New.
I think that all imports which use a "nullpart" suffers from this problem. ( Step, Iges, DXF/DWG, - I don't know about the other import formats.)
Of course the case is different if one chooses the option "import to work part" but then if the import produces an assembly ...

In case you have the files in a PLM system, the problem should go away, but not all have this PLM system.
The only recommendation i have is that you use load options - Search directories, and be careful where you put the import results.

Also try avoid "roundtrip conversions" if possible, ( a roundtrip conversion is when one tests the ,say step, export we just did by importing the step files back into NX.
When importing step. NX will save corresponding , NEW, files with the same names as the original.
- I have seen a case where a user did exactly this, and finally deleted the wrong set of files from disk...


Regards,
Tomas
 

Is there a way to show/display the part header information.
by NX interactive mode or by NX API ? (in read only of course)
 
To my knowledge it's not possible in interactive mode.
I used the "Ug_inspect.exe" to double check my statements above. It will show the header info + the UID. ( and a lot more stuff which normal people doesn't benefit from...:)

If you use the "nx command prompt", the path is set and you can type :
d:\directory\directory\ug_inspect filename1.prt


Regards,
Tomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor