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
| var workspaceView = MonocleViewExtension.view.FindVisualChildren<WorkspaceView>().First(); | |
| var canvasAdorner = AdornerLayer.GetAdornerLayer(workspaceView); | |
| canvasAdorner.Add(new CustomAdorner(workspaceView)); |
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('System') | |
| from System.Collections.Generic import List | |
| clr.AddReference('RevitAPI') | |
| from Autodesk.Revit.DB import * | |
| from Autodesk.Revit.DB.Structure import * | |
| clr.AddReference('RevitNodes') |
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("RevitNodes") | |
| import Revit | |
| clr.ImportExtensions(Revit.Elements) | |
| clr.AddReference("RevitAPIUI") | |
| from Autodesk.Revit.UI import * | |
| clr.AddReference("RevitServices") |
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('RevitServices') | |
| import RevitServices | |
| from RevitServices.Persistence import DocumentManager | |
| clr.AddReference('RevitAPI') | |
| import Autodesk | |
| from Autodesk.Revit.DB 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('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
| #license https://choosealicense.com/licenses/bsd-3-clause/ | |
| import clr | |
| # Import DocumentManager and TransactionManager | |
| clr.AddReference("RevitServices") | |
| import RevitServices | |
| from RevitServices.Persistence import DocumentManager | |
| # Import RevitAPI | |
| clr.AddReference("RevitAPI") |
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('RevitNodes') | |
| import Revit | |
| clr.ImportExtensions(Revit.GeometryConversion) | |
| clr.ImportExtensions(Revit.Elements) |
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("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) |
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 | |
| doc = DocumentManager.Instance.CurrentDBDocument |
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
| #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 | |
| { |