Journal: How to find out if a feature is a product interface?
Journal: How to find out if a feature is a product interface?
(OP)
Hi,
I have
to get an array of the features in the part. The problem is, some of the features in partFeatures are product interface features, and there is no way to tell if they are standard features, like sketches and extrudes, or product interface features.
Now, if I have
I get an array of InterfaceObject, which tells me which features they reference, but there is still no way to deduce which features are product interfaces.
The reason I need to know is I'm trying to write a program that checks if the last feature is current, and display a warning if it isn't. The ufs.Modl.AskCurrentFeature(aPart.Tag, outFeatureTag) will give the current feature, but it's not possible to tell if it's the last feature because sometimes the last feature is a product interface, which I want to ignore.
I have
CODE
partFeatures = aPart.Features.GetFeatures
to get an array of the features in the part. The problem is, some of the features in partFeatures are product interface features, and there is no way to tell if they are standard features, like sketches and extrudes, or product interface features.
Now, if I have
CODE
aPart.ProductInterface.CreateObjectBuilder.QueryProductInterfaceObjects(aPart)
I get an array of InterfaceObject, which tells me which features they reference, but there is still no way to deduce which features are product interfaces.
The reason I need to know is I'm trying to write a program that checks if the last feature is current, and display a warning if it isn't. The ufs.Modl.AskCurrentFeature(aPart.Tag, outFeatureTag) will give the current feature, but it's not possible to tell if it's the last feature because sometimes the last feature is a product interface, which I want to ignore.
NX10.0 Win8.1 64bit i7-3770K 16GB QuadroK2200





RE: Journal: How to find out if a feature is a product interface?
CODE
From the little testing I did, it seems that if the result of is_browseable is false, then the feature is a product interface (and thus can be ignored). I have no idea what a browseable feature is, but it seems to be working in this situation.
NX10.0 Win8.1 64bit i7-3770K 16GB QuadroK2200