Skip to content

Scripting editor for fsharp in Revit

License

Notifications You must be signed in to change notification settings

goswinr/Fesh.Revit

Repository files navigation

Fesh.Revit

This repo contains a Autodesk Revit plugin to host Fesh. Fesh is a fsharp scripting editor based on AvalonEdit. The editor supports the latest features of F# 8.0 via FCS 430.0.0. It has semantic syntax highlighting, auto completion and typ info tooltips. The output log supports colored text.

The example script in the root folder generates the axes for cladding of the Louvre Abu Dhabi. See also my talk at FSharpConf 2016

How to build

Before compiling make sure the path in the file Fesh.addin points to the correct location. The addin file will then be copied to C:/ProgramData/Autodesk/Revit/Addins/20XX/Fesh.addin as the last step of the build process. See end of the .fsproj files

How to use F# with Revit

By default a f# script evaluation starts asynchronous on a new thread. The Fesh.Revit.dll also provides utility functions to run synchronous transaction on the current document or app instance:

Fesh.Revit.ScriptingSyntax.runApp (fun (app:UIApplication)  -> ...)

Licence

MIT