This file contains 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
#light | |
open System | |
open Cairo | |
open Gtk | |
Gtk.Application.Init() | |
let window = new Gtk.Window("F# Cairo") | |
let vBox = new Gtk.VBox() |
This file contains 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
#light | |
open System | |
open Cairo | |
open Gtk | |
open Gdk | |
Gtk.Application.Init() | |
let window = new Gtk.Window("Fucull") |
This file contains 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
(* | |
to compile use: | |
fsc FebKit.fs -r "/usr/lib/cli/webkit-sharp-1.0/webkit-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll" -r "/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll" | |
*) | |
#light | |
open System | |
open WebKit | |
open Gtk |
This file contains 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
public void Initialize() | |
{ | |
DocumentCollection dm = Application.DocumentManager; | |
dm.DocumentActivated += delegate(object s, DocumentCollectionEventArgs d){ | |
Document doc = d.Document; | |
doc.CommandWillStart += delegate(object sender, CommandEventArgs e){ | |
if ((e.GlobalCommandName == "PUBLISH") || | |
(e.GlobalCommandName == "EXPORT") || | |
(e.GlobalCommandName == "3DDWF")){ |
This file contains 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
// | |
// Compare TypeFilter versus using an | |
// anonymous method to filter elements. | |
// By Guy Robinson, [email protected]. | |
// | |
// Copyright (C) 2008 by Jeremy Tammik, | |
// Autodesk Inc. All rights reserved. | |
// | |
// Updated to the Revit 2011 API and added LINQ filtering. | |
// Changed the anonymous method to a lambda expression. |
This file contains 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
void updateReferencingSheet(Document doc) | |
{ | |
// Retrieve the built-in VIEW_DISCIPLINE parameter | |
Parameter discipline = selectedViewport | |
.get_Parameter(BuiltInParameter.VIEW_DISCIPLINE); | |
// Save the value of that parameter for later | |
int disciplineNo = discipline.AsInteger(); | |
Transaction transaction = new Transaction(doc); |
This file contains 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
try | |
{ | |
if( null == commandData ) | |
{ | |
throw new ArgumentNullException( | |
"commandData" ); | |
} | |
UIApplication uiapp = commandData.Application; | |
Application app = uiapp.Application; |
This file contains 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
try { | |
if (null == commandData) { | |
throw new ArgumentNullException("commandData"); | |
} | |
UIApplication app = commandData.Application; | |
UIDocument uiDoc = app.ActiveUIDocument; | |
Document doc = uiDoc.Document; | |
using (Transaction transaction = new Transaction(doc)) { |
This file contains 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
namespace FSharpPanelBuilder | |
open System | |
open System.Collections.Generic | |
open Autodesk.Revit | |
open Autodesk.Revit.UI | |
open Autodesk.Revit.Attributes | |
open Autodesk.Revit.DB | |
open Autodesk.Revit.UI.Selection |
This file contains 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
namespace FSharpPanelBuilder | |
open System | |
open System.Collections.Generic | |
open Autodesk.Revit | |
open Autodesk.Revit.UI | |
open Autodesk.Revit.Attributes | |
open Autodesk.Revit.DB | |
open Autodesk.Revit.UI.Selection |
OlderNewer