zenwalk / mapaction-toolbox

Automatically exported from code.google.com/p/mapaction-toolbox
0 stars 0 forks source link

Checking underlying data type does not work from ArcMap, but does work from ArcCatalog #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create some correctly named feature classes.
2. Check the names by launching the Name checker from ArcCatalog (they will 
validate as expected).
3. Now add they to ArcMap and check them again (they will report that the data 
type does not match the underlying data type).

Original issue reported on code.google.com by andrewphilipsmith on 14 Jul 2010 at 2:47

GoogleCodeExporter commented 9 years ago
Fixed. The relationship between an IDataset and an IFeatureClass is different 
in ArcMap and ArcCatalog. Inserting this code fixed it

{{{
 'check to see if there is an under lying Feature Class
        If TypeOf m_DataSet Is IFeatureClass Then
            'This works for ArcCatalog
            fc = DirectCast(m_DataSet, IFeatureClass)
        ElseIf TypeOf m_DataSet Is ESRI.ArcGIS.Carto.IFeatureLayer Then
            'This works for ArcMap
            fc = DirectCast(m_DataSet, IFeatureLayer).FeatureClass
        Else
            fc = Nothing
        End If
}}}

Original comment by andrewphilipsmith on 10 Sep 2010 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by andrewphilipsmith on 21 Jul 2013 at 7:50