Robot API: Selection FromText, is the order guaranteed?

Robot API: Selection FromText, is the order guaranteed?

JacquesGaudin
Advocate Advocate
507 Views
2 Replies
Message 1 of 3

Robot API: Selection FromText, is the order guaranteed?

JacquesGaudin
Advocate
Advocate

Quick question about creating selections with the `FromText` method: if I iterate over the selection, is the order of the output guaranteed? Is it sorted in ascending order?

 

For example, if I select all nodes with `sel_1.FromText('all')` and `sel_2.FromText('all')`, am I certain that `sel_1.Get(i)` and `sel_2.Get(i)` gives me always the same number for a given i?

 

 

0 Likes
Accepted solutions (1)
508 Views
2 Replies
Replies (2)
Message 2 of 3

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution

Hi @JacquesGaudin 

 

Yes.

 



Rafal Gaweda
0 Likes
Message 3 of 3

JacquesGaudin
Advocate
Advocate

@Rafal.Gaweda Excellent news, I was assuming it would be sorted but needed to double-check as this is not explicitly mentioned in the API reference. Thanks a lot.

0 Likes