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
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge eol=lf | |
*.anim merge=unityyamlmerge eol=lf | |
*.unity merge=unityyamlmerge eol=lf | |
*.prefab merge=unityyamlmerge eol=lf |
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 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 |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Autodesk.Revit.DB; | |
namespace Geometry | |
{ |
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 System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Web; | |
namespace ConsoleApplication4 | |
{ |
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 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 |
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
#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 |
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 DotNetOpenAuth and RestSharp | |
WebServerClient client = new WebServerClient( | |
new AuthorizationServerDescription | |
{ | |
TokenEndpoint = new Uri("https://myurl/oauth"), | |
ProtocolVersion = ProtocolVersion.V20 | |
}, "client", "secret"); | |
var token = client.GetClientAccessToken(); |
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
# 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 |
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
/// <summary> | |
/// Random ID Generator | |
/// more ideas: http://www.anotherchris.net/csharp/friendly-unique-id-generation-part-2/ | |
/// </summary> | |
/// <param name="length">Length of the string</param> | |
/// <returns></returns> | |
public static string RandomString(int length) | |
{ | |
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
var random = new Random(); |