SetEndCondition swEndCondUpToBody

Hi, all,

I have an assembly where I'm trying to extrude some features from body A upToBody B.  I can't figure out what order to perform the selects and setEndCondition and setEndConditionReference in, and I can't figure out how the marks should go.  My function is below:

        private Component2 fieldOfView;

        private void lengthenExtrusion(Feature feature, Component2 swComponent, IConfiguration configToEdit)

        {

            String[] configurationContainer = { configToEdit.Name };

            ExtrudeFeatureData2 extrusion = feature.GetDefinition();

            extrusion.AccessSelections(swAssembly, swComponent);

            swComponent.Select2(false, 1 << 0);

            extrusion.SetEndCondition(true, (int)swEndConditions_e.swEndCondUpToBody);

            fieldOfView.Select2(true, 1 << 1);

            extrusion.SetEndConditionReference(true, fieldOfView);

            extrusion.SetChangeToConfigurations((int)swInConfigurationOpts_e.swThisConfiguration, configurationContainer);

            feature.ModifyDefinition(extrusion, swDoc, swComponent);

            swDoc.ForceRebuild3(true);

            swComponent.DeSelect();

            fieldOfView.DeSelect();

        }

I want to extrude "extrusion" up to the body "fieldOfView".  I tried recording a macro to see how the marks work, but the recorder didn't capture the end condition changing.  Is there documentation somewhere about what to set marks to for functions that require them?

SolidworksApi macros