cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining earliest component from the chronological order in the ANT

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello everyone!

 

Is it possible to programmatically obtain the earliest component from the the chronological order in the ANT?

3 REPLIES

Re: Obtaining earliest component from the chronological order in the ANT

Honored Contributor
Honored Contributor

Yes. Activate the chronological order then use .AskChildrenOrder to get a list of components in order; the first in the list will be the first that was added to the assembly.

Re: Obtaining earliest component from the chronological order in the ANT

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Thanks, I will try it. Is it necessarily to explicitly activate the order, or can I just refer to it?

Re: Obtaining earliest component from the chronological order in the ANT

Honored Contributor
Honored Contributor

According to the API docs:

Given a parent NXOpen.Assemblies.Component this method returns immediate child NXOpen.Assemblies.Component s
in the same order in which they are ordered in this NXOpen.Assemblies.ComponentOrder

Since it only takes the parent component as input and not a specified order, it would seem that you need to activate the desired order first.