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
using System.IO; | |
using System.Reflection; | |
using System.Windows.Media.Imaging; | |
using Autodesk.Revit.DB; | |
using Autodesk.Revit.UI; | |
using Autodesk.Revit.UI.Events; | |
using InPlaceWarning.Forms; | |
using InPlaceWarning.InPlaceWarningAboutButton; | |
using TaskDialog = Autodesk.Revit.UI.TaskDialog; |
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
blueprint: | |
name: Awtrix-light custom application | |
description: Custom Awtrix-light application | |
domain: automation | |
input: | |
awtrix_entity: | |
name: Awtrix-light mqtt device | |
description: The device to be controlled | |
selector: | |
device: |
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
# Importing Reference Modules | |
# CLR ( Common Language Runtime Module ) | |
import clr | |
# Adding the DynamoRevitDS.dll module to work with the Dynamo API | |
clr.AddReference('DynamoRevitDS') | |
import Dynamo | |
# access to the current Dynamo instance and workspace | |
dynamoRevit = Dynamo.Applications.DynamoRevit() | |
currentWorkspace = dynamoRevit.RevitDynamoModel.CurrentWorkspace |
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
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory | |
clr.AddReference('RevitServices') | |
from RevitServices.Persistence import DocumentManager | |
from RevitServices.Transactions import TransactionManager | |
doc = DocumentManager.Instance.CurrentDBDocument | |
walls = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).WhereElementIsNotElementType().ToElements() |
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
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory | |
clr.AddReference('RevitServices') | |
from RevitServices.Persistence import DocumentManager | |
from RevitServices.Transactions import TransactionManager | |
doc = DocumentManager.Instance.CurrentDBDocument | |
walls = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).ToElements() |
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
# import the common language runtime to communicate with the Revit API | |
import clr | |
# import the revit api | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import * | |
# import dynamo's revit nodes | |
clr.AddReference('RevitNodes') | |
import Revit |
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
# Load the Python Standard and DesignScript Libraries | |
import sys | |
import clr | |
clr.AddReference('PresentationCore') | |
from System.Windows.Media import FontFamily | |
clr.AddReference('AdWindows') | |
from Autodesk.Windows import * |
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
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import * | |
from Autodesk.Revit.DB.Structure import * | |
clr.AddReference('RevitAPIUI') | |
from Autodesk.Revit.UI import * | |
clr.AddReference('System') |
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
import clr | |
clr.AddReference("RevitAPI") | |
from Autodesk.Revit.DB import * | |
clr.AddReference('RevitServices') | |
import RevitServices | |
from RevitServices.Persistence import DocumentManager | |
from RevitServices.Transactions import TransactionManager |
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
public static void AlignViewTitle(global::Revit.Elements.Element viewport) | |
{ | |
//get the current document (built in Dynamo method) | |
Autodesk.Revit.DB.Document doc = DocumentManager.Instance.CurrentDBDocument; | |
//cast the viewport to the internal Revit DB Type | |
Autodesk.Revit.DB.Viewport internalViewport = viewport.InternalElement as Autodesk.Revit.DB.Viewport; | |
//get the original box center (for when we re-place the viewport) | |
var originalBoxCenter = internalViewport.GetBoxCenter(); |
NewerOlder