F#

By playing with F# and ArcGIS Runtime I tried to re-create a sample C# project to F#. For the WPF part I used the Visual Studio extension F# Empty Windows App (WPF) and F# Windows App (WPF, MVVM) the NuGet packages FSharp.ViewModule.Core and FsXaml for WPF. The XAML I copied more or less without changes to the F# project. During running the app it immediately crashed with an error: Additional information: 'Cannot create unknown type '{http://schemas.esri.com/a... Line number ......

During compilation of the F# Empty Windows App (WPF) I got that error (check the output pane carefully). To solve this issue you have to thrust of the XAML Type Provider of this project. This you can do via the Visual Studio options: ......

Situation, Problem During playing a little bit with these WPF MVC F# projects inside SharpDevelop I stumbled over the situation, that I could not send F# snippets to the interactive window. The menu was not available. Normally it looks like this: Solution If you would like to use the context menu “Send to F# Interactive” inside SharpDevelop during fsx developing, you have to ensure that this fsx file is part of an F# project! fsx only as a solution item no context menu “Send to F# Interactive” fsx ......

Situation My private machine has Microsoft Visual Studio Express 2012 for Windows Desktop. This Visual Studio edition doesn’t allow to develop with F#. So I installed additionally SharpDevelop. But it took longer as expected to get F# projects running in this environment. Problem Creating a new or opening an existing F# project ended up in this error: “Please ensure that the F# compiler is installed on your computer.” According the the installation hints from Use F# on Windows, I installed the following ......

Today i played a little bit with IFeature-sequences and piping data. The result was a calculator of the bounding box around all features in a feature class. Maybe a little bit dirty, but for learning was it OK. ;-) open System;; #I "C:\Program Files\ArcGIS\DotNet";; #r "ESRI.ArcGIS.System.dll";; #r "ESRI.ArcGIS.DataSourcesGDB... #r "ESRI.ArcGIS.Geodatabase.dl... #r "ESRI.ArcGIS.Geometry.dll";; open ESRI.ArcGIS.esriSystem;; open ESRI.ArcGIS.DataSourcesGDB;; open ESRI.ArcGIS.Geodatabase;; open ......

After accessing one feature now i iterate through all features of a feature class: open System;; #I "C:\Program Files\ArcGIS\DotNet";; #r "ESRI.ArcGIS.System.dll";; #r "ESRI.ArcGIS.DataSourcesGDB... #r "ESRI.ArcGIS.Geodatabase.dl... open ESRI.ArcGIS.esriSystem;; open ESRI.ArcGIS.DataSourcesGDB;; open ESRI.ArcGIS.Geodatabase;; let aoInitialize = new AoInitializeClass();; let status = aoInitialize.Initialize(esr... let workspacefactory = new SdeWorkspaceFactoryClass();; ......

After having a first look on F# its time to ask: How could i use F# with ArcObjects. So my first steps was to do something with a feature in a F# interactive session. And these are my first code lines: open System;; #I "C:\Program Files\ArcGIS\DotNet";; #r "ESRI.ArcGIS.System.dll";; #r "ESRI.ArcGIS.DataSourcesGDB... #r "ESRI.ArcGIS.Geodatabase.dl... open ESRI.ArcGIS.esriSystem;; open ESRI.ArcGIS.DataSourcesGDB;; open ESRI.ArcGIS.Geodatabase;; let aoInitialize = new AoInitializeClass();; let ......