Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/goswinr/fesh.revit

Scripting editor for fsharp in Revit
https://github.com/goswinr/fesh.revit

fsharp fsharp-console fsharp-interactive revit revit-addin revit-api

Last synced: about 2 months ago
JSON representation

Scripting editor for fsharp in Revit

Awesome Lists containing this project

README

        

![Logo](https://raw.githubusercontent.com/goswinr/Fesh.Revit/main/Media/logo128.png)

# Fesh.Revit

![code size](https://img.shields.io/github/languages/code-size/goswinr/Fesh.Revit.svg)
[![license](https://img.shields.io/github/license/goswinr/Fesh.Revit)](LICENSE)

Fesh.Revit is an F# scripting editor hosted inside [Revit]("https://www.autodesk.com/products/revit/overview"). It is based on [Fesh](https://github.com/goswinr/Fesh).\
It has semantic syntax highlighting, auto completion, type info tooltips and more.\
The output window supports colored text.

![](Docs/screen1.png)
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

To build use the [.NET SDK](https://dotnet.microsoft.com/en-us/download) via the command line.\
You need to use pass in your Revit version as an argument like this:

```bash
dotnet build -p:RevitVersion=2024
```
This will find and compile `Fesh.Revit.fsproj` since it is the only *.fsproj file in the root folder.\
It will automatically create an `Fesh.addin` xml file for the specified Revit version\
in the Revit Addins folder at `C:/ProgramData/Autodesk/Revit/Addins/20XX/Fesh.addin`.

### 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) -> ...)

### License
[MIT](https://github.com/goswinr/Fesh.Revit/blob/main/LICENSE.md)