cancel
Showing results for 
Search instead for 
Did you mean: 

Assembly clone behaviour & getting Wave link dependencies via NXOpen

Experimenter
Experimenter

Hello All,

 

We are in the proccess of developing a small tool to use instead of the NX builtin assembly clone dialog. The tool will provide some additional functionality such as advanced renaming capabilities, update of Part attributes and replacement/removal of single Component occurences after the clone process. 

 

The NX Builtin clone interface seems to do quite a bit of work to detect Interpart depdendencies when applying Clone/Retain/Replace clone actions to single parts. We didnt't find any API functions yet that provide this kind of functionality, so we tried to reverse engineer the behaviour, with limited success...

 

Does anybody know of any documentation or sample codes could help in checking for these Interpart dependencies?

 

### Update:

We did make some progress and can detect almost all dependencies.

 

I can detect Interpart Expressions by stepping through all the expression lists of loaded parts and parsing the Expression.Equation string, it works although it doesn't feel like a very nice way of doing things.

 

Now I'm working on detecting dependencies via Wave links. After browsing through the Open APIs I found the NXOpen.Part.GetInterpartParents() and NXOpen.Part.GetInterpartChildren() methods, which seem to do what I want. They return all linked geometry sources and children.

 

But the Clone interface seems to also mark parent assemblies as dependent, an example:

 

TestAsm containts testPartA and testPartB

TestAsm

 |- PartA

 |- PartB

 

PartA contains geometry that is linked in PartB (eg. PartA contains a curve feature, and PartB contains a Linked Curve feature.)

 

When applying the 'Retain' action to PartB. PartA is retained as well (which is correct, and also the behaviour I can get when using GetInterpartParents()), but the NX Clone UI also marks the assembly TestAsm as 'Retained'.

But why is that? Are Wave links somehow dependent on their parent assembly to work?

 

Greetings

 

 

5 REPLIES

Re: Assembly clone behaviour & getting Wave link dependencies via NXOpen

Honored Contributor
Honored Contributor

The expression collection also offers a .GetInterpartReferences method.

Re: Assembly clone behaviour & getting Wave link dependencies via NXOpen

Experimenter
Experimenter

Thanks! That certainly feels better than parsing the strings myself!

 

I still do have problems with resolving WAVE links properly though.

Re: Assembly clone behaviour & getting Wave link dependencies via NXOpen

Esteemed Contributor
Esteemed Contributor

And you might also want to check... you can set expressions in other parts using IPEs (i.e. the expression NAME is an inter-part reference).

 

Normal case:

expression_name = other_part::other_part_expression

 

 

You can turn that around and have:

other_part::other_part_expression = this_part_expression

 

 

Ken (edited to fix "smiley" issue)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Assembly clone behaviour & getting Wave link dependencies via NXOpen

Experimenter
Experimenter

Thanks Ken, I wasn't aware of that possibility, thanks for that.

 

I think its quite adventurous to 'push' Expressions into other Parts, and how this can come in handy is beyond me :-)

 

As for Wave Link depdendencies: The Information output for Wave Features contains the information "Position Determined by" and then the assembly part that the feature was created in (?).

But I can't find any way to get to that information using the Open API? Is there a way to get the Information listing output for a single Feature?

 

 

Re: Assembly clone behaviour & getting Wave link dependencies via NXOpen

Honored Contributor
Honored Contributor

I was using the utility "ug_inspect" the other day and noticed that it has an option to "print all referenced part information". I didn't dig into it to see if it would return wave link data, I was after other information, but perhaps it will be useful to you.