Skip to content

Instantly share code, notes, and snippets.

Matteo Cominetti teocomi

Block or report user

Report or block teocomi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dynamo_list-loaded-builtincategories.py
#this script lists the BuiltInCategories currently loaded in a Revit document
#can be easily tweaked to instead list categories only
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
@teocomi
teocomi / ConvexHull.cs
Last active Dec 12, 2018
Calculates the convex hull from a given list of Revit points
View ConvexHull.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.DB;
namespace Geometry
{
@teocomi
teocomi / GoogleAnalyticsApi.cs
Last active Jul 11, 2018 — forked from PallasStreams/GoogleAnalyticsApi.cs
C# wrapper around the Google Analytics Measurement Protocol API
View GoogleAnalyticsApi.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
namespace ConsoleApplication4
{
View BatchReplaceTextInExcelFiles.vba
Public Sub BatchReplaceTextInWordFiles()
' https://www.datanumen.com/blogs/find-replace-contents-multiple-word-documents/
Dim objDoc As Workbook
Dim strFile As String
Dim strFolder As String
Dim oldNamesFile As String
Dim newNamesFile As String
Dim strFindText As String
Dim strReplaceText As String
Dim oldnames As New Collection
View dynamo_get-tags-by-element-id.py
#Given an element Id or a list or elementIds, return the matching tags/s found
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
View dynamo_get-levels-by-name.py
#Given a level name or a list or level names, return the matching level/s found
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
@teocomi
teocomi / dynamo_split-columns-by-level.py
Created Mar 28, 2018
Splits columns by level in Revit using Dynamo
View dynamo_split-columns-by-level.py
#inspired by: https://danimosite.wordpress.com/2017/06/06/split-walls-and-columns-by-level/#comment-10
#as input provide only a list of the levels you want to cut with
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
@teocomi
teocomi / dynamo_get-revit-elements-by-guid.py
Created Mar 27, 2018
Get Revit Elements by UniqueID (GUID) from Dynamo
View dynamo_get-revit-elements-by-guid.py
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import ElementId
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference("System")
from System.Collections.Generic import List
@teocomi
teocomi / dynamo_fix-column-level-offset.py
Last active Mar 9, 2018
Fixes column level and offset in Revit using Dynamo
View dynamo_fix-column-level-offset.py
# Inspired by: https://danimosite.wordpress.com/2017/06/06/split-walls-and-columns-by-level/
# Fixes Columns in Revit using Dynamo by setting Top and Base levels to the closest levels and sets the right offsets to those levels
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
@teocomi
teocomi / dynamo_select-revit-elements-by-id.py
Last active Mar 9, 2018
Select Revit Elements by ID from Dynamo
View dynamo_select-revit-elements-by-id.py
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import ElementId
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference("System")
from System.Collections.Generic import List
You can’t perform that action at this time.