AnsweredAssumed Answered

IExtrudeFeatureData2.GetFromEntity returns null

Question asked by Uy Ha on Mar 27, 2020
Latest reply on Mar 27, 2020 by Artem Taturevych

I want to get the entity used for extrusion by the following code

 

var model = SwApp.IActiveDoc2;
var selectionManager = model.SelectionManager;

var feature = selectionManager.GetSelectedObject6(1, -1) as IFeature;
var featureData = feature.GetDefinition() as IExtrudeFeatureData2;
var accessSuccess = featureData.AccessSelections(model, null);

featureData.GetFromEntity(out var fromEntity, out var fromType);

featureData.ReleaseSelectionAccess();

 

however, the fromEntity is always null, am I doing something wrong here?

I've attached the Part doc I used with the above code, and this is the debug screen when try to see the values

Attachments

Outcomes