cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Best way to access a feature_OTK Java

VladiSlav
17-Peridot

Best way to access a feature_OTK Java

Hello everyone!

 

In Java OTK, a feature can be accessed by its name (1), number (2), or ID (3):

Снимок.PNG
Accessing via a number is not a good option.
What's the best way to access using a name or ID?
If using ID, please tell me how is it better to implement it?
Is there any other better method?
Thanks in advance!


Respectfully!

4 REPLIES 4

Name

 

The ID is just a number that is autoincreased while add features. The holes come from deleted or hidden features inside of Creo. So if you use the id you need to be sure to be on the same model.

 

The name on the other hand can be simpler changed by others and could be also set same between different models also on later added features.

 

The number is just the position inside the feature tree.

 

So the real question is what you want to archive with the selection.

 

Br,

Eike

Thanks for the answer!
The fact of the matter is that I would like to find a way in which there are no shortcomings that you have listed. But, apparently, this is too naive.

remy
21-Topaz I
(To:VladiSlav)

This is an API. There is no good or bad solution. But rather a good fit for a situation.

So what is your situation in asking how to select?

VladiSlav
17-Peridot
(To:remy)

Thanks for the answer!

My task is to build 3D geometry using code. And I would like the geometry to be built in the most safe way, that is, there should be as few cases as possible in which an error could occur.

Top Tags