Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

List of possible Feature types

Is there a list of the possible values that can be returned from the FeatureType property of a Features.Feature?

It seems strange that the only way I can get these values is by creating a feature and then writing a journal to return the FeatureType for each feature I have created. As a follow on question, is the list broken down by the different sub types (i.e. Features.BodyFeature, Features.CurveFeature, etc...)


(Version NX 8)


Thank you,

Dave Reich


Re: List of possible Feature types

What programming language?

Assuming a .net language, refer to the "feature class" in the API reference; scroll to the bottom of the page and it will show the "inheritance heirarchy" (all the classes that inherit from the feature class).


Re: List of possible Feature types

VB .Net is the language I am using.


I saw the list before but I wasn't confident that the name listed in the hierarchy is the name that is returned from featuretype, at the very least featuretype returns a string that is all caps and the list is not all caps, if thats the only difference I can live with that. I guess I just need to do some test cases.

Accepted by topic author ReichDM
‎06-28-2017 05:29 PM

Re: List of possible Feature types

For testing a feature's type, I prefer to use the TypeOf operator. This operator uses the class name, so you can use what is listed in the inheritance hierarchy. The .FeatureType property returns a string value that sometimes matches the class name but often does not. I've always wondered if it returns the same english value in a non-english version of NX or if it returns a value in the current language. If it does not return the english string value, your code would not work on installs using a different language.


If TypeOf(someFeature) Is DatumCsys then
    'code for datum csys feature
End If