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
import clr | |
clr.AddReference('ProtoGeometry') | |
from Autodesk.DesignScript.Geometry import * | |
#our inputs | |
phases = IN[0] | |
#to output | |
results = [] |
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
using Autodesk.DesignScript.Runtime; | |
using System.Collections.Generic; | |
using Autodesk.Revit.DB; | |
using RevitServices.Persistence; | |
namespace ZeroTouchNode.Revit.Application | |
{ | |
/// <summary> | |
/// Wrapper class for application level nodes. | |
/// </summary> |
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
import clr | |
clr.AddReference('ProtoGeometry') | |
from Autodesk.DesignScript.Geometry import* | |
clr.AddReference('DSCoreNodes') | |
from DSCore import * | |
clr.AddReference('GeometryColor') | |
from Modifiers import* |
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 static global::Revit.Elements.Element ToUpper(global::Revit.Elements.Element textNote) | |
{ | |
Autodesk.Revit.DB.Document doc = DocumentManager.Instance.CurrentDBDocument; | |
Autodesk.Revit.DB.TextNote internalNote = (Autodesk.Revit.DB.TextNote)textNote.InternalElement; | |
//Get the text from the text box | |
//we obtain formatted text and modify the caps instead of the string. Preserves formatting. | |
FormattedText formattedText = internalNote.GetFormattedText(); | |
formattedText.SetAllCapsStatus(true); | |
//Change all the text to upper case and reassign to the text box |
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 Result OnStartup(UIControlledApplication a) | |
{ | |
a.ControlledApplication.FileImporting += ControlledApplicationOnFileImporting; | |
return Result.Succeeded; | |
} | |
private void ControlledApplicationOnFileImporting(object sender, FileImportingEventArgs e) | |
{ | |
TaskDialog.Show("Alert", "Sorry about that. No CAD import for you."); | |
e.Cancel(); |
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
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 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
# Copyright(c) 2017, Dimitar Venkov | |
# @5devene, dimitar.ven@gmail.com | |
# www.badmonkeys.net | |
import clr | |
clr.AddReference('System.Windows.Forms') | |
clr.AddReference('System.Drawing') | |
from System.Drawing import Point, Color, Font | |
from System.Windows.Forms import * |
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
#This code is proudly provided under the BSD-3-Clause, https://opensource.org/licenses/BSD-3-Clause | |
using System; | |
using Autodesk.Internal.Windows; | |
using Autodesk.Revit.DB; | |
using Autodesk.Revit.DB.Events; | |
using Autodesk.Revit.UI; | |
namespace PromptForSaveOnDynamoLaunch | |
{ |
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
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 | |
doc = DocumentManager.Instance.CurrentDBDocument |
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
import clr | |
clr.AddReference("RevitAPIUI") | |
from Autodesk.Revit.UI import * | |
dialogContent = "You are about to delete all Fabrication Pipework content from the model. Are you sure?" | |
buttons = TaskDialogCommonButtons.Yes | TaskDialogCommonButtons.No | |
#assigning this to a dialog result variable allows us to check what the user selected | |
dialogResult = TaskDialog.Show('Delete all MEP',dialogContent,buttons) |
OlderNewer