AnsweredAssumed Answered

ArcGIS Engine 10 : VB.NET Implicit Conversion Problem

Question asked by nmfadhil on Jul 5, 2012
Latest reply on Jul 7, 2012 by nmfadhil
Hey folk of greater ArcObjects Wisdom than I,  how can I handle the errors regarding the implicit conversion? Below is example of code that I working at right now. Please help me :(

Private Sub zoomFeature(ByVal objectID As String)         Dim pQueryFilter As IQueryFilter         Dim pFeatureLayer As IFeatureLayer         Dim pFeatureSelection As IFeatureSelection         Dim pLayer As ILayer         Dim intCount As Integer         For intCount = 0 To AxMapControl1.LayerCount - 1             pLayer = AxMapControl1.Map.Layer(intCount)             If TypeOf pLayer Is IFeatureLayer Then                 pFeatureLayer = pLayer '<---Implicit conversion from 'ESRI.ArcGIS.Carto.ILayer' to 'ESRI.ArcGIS.Carto.IFeatureLayer'                 pFeatureSelection = pFeatureLayer '<---Implicit conversion from 'ESRI.ArcGIS.Carto.IFeatureLayer' to 'ESRI.ArcGIS.Carto.IFeatureSelection'                 If pFeatureLayer.Name = "DistrictBoundary" Then                     'Create the query filter                     pQueryFilter = New QueryFilter '<---Implicit conversion from 'ESRI.ArcGIS.Geodatabase.QueryFilterClass' to 'MapControlApplication1.QueryFilter'                     pQueryFilter.WhereClause = "OBJECTID = " & objectID '<--- 'WhereClause' is not a member of 'MapControlApplication1.QueryFilter'                     AxMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, Nothing)                     pFeatureSelection.SelectFeatures(pQueryFilter, esriSelectionResultEnum.esriSelectionResultNew, False) '<---Implicit conversion from 'MapControlApplication1.QueryFilter' to 'ESRI.ArcGIS.Geodatabase.IQueryFilter'                 End If             End If End Sub

Outcomes