I am trying to send multiples input features to the Geoprocessing.IGeoProcessor (to do an Intersect). I am doing this because I can't add the layer path since one of them is from ArcSDE. The example on the ESRI website is incomplete:
Building a custom geoprocessing function tool
[VB.NET] ' Multivalue parameter of Feature Layers/Feature Classes.' Dim inputParameter As IGPParameterEdit3 = New GPParameterClass() Dim inputType As IGPDataType = New GPFeatureLayerTypeClass() Dim mvType As IGPMultiValue = New GPMultiValueClass() mvType.MemberDataType = inputType Dim mvValue As IGPMultiValue = New GPMultiValueClass() mvValue.MemberDataType = inputType inputFeatures.Name = "input_features" inputFeatures.DisplayName = "Input Features" inputFeatures.ParameterType = esriGPParameterType.esriGPParameterTypeRequired inputFeatures.Direction = esriGPParameterDirection.esriGPParameterDirectionInput inputFeatures.DataType = CType(mvType, IGPDataType) inputFeatures.Value = CType(mvValue, IGPValue) parameters.Add(inputFeatures) There is no code to actually add the feature layer to the input features list. I tried to add my feature layer with :
mvValue.AddValue(lFeatureLayer) and I got a invalid COM interface cast exception. What is the real way to do this?