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

Best way to access a feature_OTK Java

Pearl

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

Re: Best way to access a feature_OTK Java

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

Re: Best way to access a feature_OTK Java

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?

Re: Best way to access a feature_OTK Java

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.

Re: Best way to access a feature_OTK Java

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.

Announcements