I am moving some applications written in VBA that have been working in ArcGIS 10.1 to ArcGIS 10.2.2. I have the ArcGIS VBA Compatibility patch installed, in addition I have gotten several applications to work. Eventually this VBA code will be rewritten in the C# environment, however at the moment I am just trying to get the code to work.
In the following example the code gets down to the
Set pPoint = pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y) line and errors out with runtime error 13 Type Mismatch
I believe it is some sort of reference error, however I cannot figure out where it is hanging. Any help is very much appreciated!
Private Sub pixel3x3picker_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)'Code to get a 3 x 3 sample average of pixels similar to the sample tool in photoshopDim pMxDoc As IMxDocumentSet pMxDoc = ThisDocumentDim pActiveView As IActiveViewSet pActiveView = pMxDoc.FocusMapDim pPoint As IPointSet pPoint = pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y)
أكثر...
In the following example the code gets down to the
Set pPoint = pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y) line and errors out with runtime error 13 Type Mismatch
I believe it is some sort of reference error, however I cannot figure out where it is hanging. Any help is very much appreciated!
Private Sub pixel3x3picker_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)'Code to get a 3 x 3 sample average of pixels similar to the sample tool in photoshopDim pMxDoc As IMxDocumentSet pMxDoc = ThisDocumentDim pActiveView As IActiveViewSet pActiveView = pMxDoc.FocusMapDim pPoint As IPointSet pPoint = pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y)
أكثر...