Showing results for 
Search instead for 
Do you mean 
Reply

Obtaining earliest component from the chronological order in the ANT

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

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

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

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.