Cancel
Showing results for 
Search instead for 
Did you mean: 

Reference set of unloaded components

Valued Contributor
Valued Contributor

Hello, I'm wondering what is truely being returned when I ask for the reference set of an unloaded component? (component.ReferenceSet)

 

I ask because I've noticed quite a large difference in my assembly when the components are loaded vs unloaded. For example, test 1 was with no components loaded and there were 175 components on the empty reference set. Test 2 was with all the components fully loaded and there were 500+ components in the empty reference set.

 

A program I'm working on makes decisions on what to do with components based on their reference sets, (skipping empty reference sets) and I'm worried that if the component is not loaded I won't be grabbing accurate information. Especially if when unloaded the component is in the empty reference set, but when loaded it's in the entire part reference set.

 

Thanks,

jgolen

NX 9.0.3.4 MP13
VB.net
Visual Studio 2015
6 REPLIES

Re: Reference set of unloaded components

Honored Contributor
Honored Contributor

I'd be wary of any information returned from an unloaded component. I've not tested it, but I'd guess you are getting the reference set that was used the last time the component was open.

 

The reference set that a component uses when opened is determined by your load options.

Re: Reference set of unloaded components

Valued Contributor
Valued Contributor
I do not fully understand this, but through my testing I can verify that the reference set of an unloaded component can change upon loading it.
NX 9.0.3.4 MP13
VB.net
Visual Studio 2015

Re: Reference set of unloaded components

Honored Contributor
Honored Contributor

As mentioned previously, the reference set to use when loading the component is determined by your assembly load options (file -> options -> assembly load options). In the screenshot below, you can see the reference set options: Special, use model, as saved, entire part, empty. With the load options set as below, when NX opens a component (any component) it will attempt to use the ref set named "special". If this ref set is not found in the file, it will move on to the next option in the list, the model ref set. If, for some reason, the file does not have a model ref set, it moves on to the next option in the list. It works down the list until it finds one that works (entire part or empty will work every time).

 

The question is: what reference set is the unloaded component reporting? I suspect it is the last used reference set (the as-saved one), though I've not tested this theory.

 

ref_set_load_option.PNG

Re: Reference set of unloaded components

Valued Contributor
Valued Contributor
Here is a test that I conducted that confirms this. Here is the assembly structure:

- Component A
-- Component B
--- Component C

1. Opened Component A. Loaded component B, loaded component C. Reference set was Entire Part. Closed assembly.

2. Opened Component B, loaded component C. Set reference set to empty. Saved and closed assembly.

3. Opened Component A. Evaluated reference set of component C, reference set was "Entire Part". Loaded component B, evaluated reference set of component C, reference set was "Entire Part." Loaded component C, evaluated reference set of component C, reference set was "Empty".

Therefore the assembly remembers that previously component C was "Entire Part" and does not update until component C is fully loaded.
NX 9.0.3.4 MP13
VB.net
Visual Studio 2015

Re: Reference set of unloaded components

Honored Contributor
Honored Contributor

Makes sense to me. Does that answer your question?

Re: Reference set of unloaded components

Valued Contributor
Valued Contributor
Yes thanks.
NX 9.0.3.4 MP13
VB.net
Visual Studio 2015