Hi,
I am using the IExtrudeFeatureData2 object to manipulate certain extrusions of our parts in assemblies. All works well except in one case.
Suppose I have a feature extruded up to a face of another part. This creates an external reference. When I now try to change this feature to a blind extrusion using the IExtrudeFeatureData2 object, I get some strange results.
The feature is effectively extruded blind with the correct depth. In the feature manager however, the ->? sign is placed next to this feature, meaning an out-of-context external reference. When I manually edit the feature to check what is wrong, I can see that all parameters are set correctly but the previously referenced face is also highlighted in the modeling area. Then, when I close the property manager without changing anything using the green accept button, the ->? disappears and all is well.
For your information I use following code in C#:
(I removed the code from this sample obtaining the feature, calling AccesSelections etc...)
pFeatData is an object of IExtrudeFeatureData2...
pFeatData.SetEndCondition(true,(int)swEndConditions_e.swEndCondBlind);
pFeatData.SetDepth(true, 0.5);
pFeatData.SetEndConditionReference(true, null); // Make sure the EndCondition references nothing.
Finally call pFeature.ModifyDefinition(...)
Does anyone have any ideas what I may be doing wrong? Or is this a bug in the SolidWorks?
Any help is greatly appreciated.
Kind regards,
Tony Van De Velde
SolidworksApi macros