- Download the Mantis zip file from https://dl.dropboxusercontent.com/u/157820459/Mantis.zip
- Unblock the Mantis zip file before extraction http://blogs.msdn.com/b/delay/p/unblockingdownloadedfile.aspx
- Place the extracted folder Mantis in the program files directory "C:\Program Files" - note that Mantis only works for 64 bit Windows at this stage
- Copy the Mantis.addin file from "C:\Program Files\Mantis\Mantis.addin" to "C:\ProgramData\Autodesk\Revit\Addins\2016\Mantis.addin"
- Run Revit, open file, and start Mantis from the Add-Ins Ribbon
- To test copy the F# code from https://gist.github.com/moloneymb/4561a548a3378bc2775f into the shell. Select all text and run selected (Run button or Alt+Enter). Once the code has run a new shape should appear in 3D Views -> CSGTree
- For help or more advanced functionality please feel free to reach out to me at moloneymb (twitter, gmail or skype)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x = false | |
// The indentation of the else clause seems wrong. | |
// could there be a compiler warning for this ? | |
if x then | |
printfn "if ?" | |
else // bad indentiation | |
printfn "else ?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// typos fixed in: | |
// http://bramjochems.com/blog/2014/05/creating-ribbon-menu-exceldna-f/ | |
module RibbonBuilder = | |
// http://bramjochems.com/blog/2014/05/creating-ribbon-menu-exceldna-f/ | |
type RibbonButtonSize = | |
| Large | |
| Medium |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on the SDK Sampl GeometryCreation_BooleanOperations | |
// This is testing code. Many improvements can be made before use in real work | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitAPI.dll" | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitDBAPI.dll" | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitAPIUI.dll" | |
#r @"C:\Program Files\Mantis\Tsunami.IDEDesktop.dll" | |
open Autodesk.Revit | |
open Autodesk.Revit.UI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Microsoft.FSharp.Collections | |
open FsEx // some F# helper libraries. eg.type Rarr = ResizeArray | |
open System | |
open Rhino | |
open Rhino.Geometry | |
open System.Drawing | |
module GeoExchange = | |
// translation from custom 3D classes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generating the full model using my custom DLLs for geometry input | |
// F# editor: https://gist.github.com/moloneymb/5e5608c129337cfefa40 | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitAPI.dll" | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitDBAPI.dll" | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitAPIUI.dll" | |
#r @"C:\Program Files\Mantis\Tsunami.IDEDesktop.dll" | |
#r @"C:\work\goswin\30_F#\16-135_LAD\LAD\GosLib\bin\Release\GosLib.dll" | |
#r @"C:\work\goswin\30_F#\16-135_LAD\LAD\LAD\bin\Release\LAD.dll" | |
open Autodesk.Revit.DB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I __SOURCE_DIRECTORY__ | |
#r "libs/NuGet.Core.dll" | |
#r "System.Xml.Linq" | |
open NuGet | |
open System | |
open System.IO | |
module NuGet = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========================================== | |
// Working fully self-contained getting-started example for Suave Web Server scripting | |
// | |
// Note you don't need to have _anything_ installed before starting with this script. Nothing | |
// but F# Interactive and this script. | |
// | |
// This script fetches the Paket.exe component which is referenced later in the script. | |
// Initially the #r "paket.exe" reference is shown as unresolved. Once it has been | |
// downloaded by the user (by executing the first part of the script) the reference | |
// shows as resolved and can be used. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Simulation of the Lorentz attractor, using Fable. | |
If you want to see this code in action, just copy this code into the Fable REPL: | |
https://fable.io/repl/ | |
*) | |
module App | |
open Elmish | |
open Elmish.React |
Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)
The following steps are mostly taken from this guide and it's only necessary to do them once:
- Create an account in Azure (or use an existing one)
- Create a resource group (or use an existing one)
OlderNewer