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
Autodesk Revit addins are generally loaded from the following locations. | |
User Addins: | |
%appdata%\Autodesk\Revit\Addins\ | |
%appdata%\Autodesk\ApplicationPlugins\ | |
Machine Addins (for all users of the machine): | |
C:\ProgramData\Autodesk\Revit\Addins\ | |
Addins packaged for the Autodesk Exchange store: |
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 generated # | |
# =============== # | |
[Tt]emp/ | |
[Oo]bj/ | |
[Bb]uild | |
/[Bb]uilds/ | |
/[Ll]ibrary/ | |
sysinfo.txt | |
*.stackdump |
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") | |
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 |
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") | |
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 |
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> | |
/// Run Revit commands using Win32 API | |
/// </summary> | |
public class Win32Api | |
{ | |
[DllImport("user32.dll")] | |
private static extern IntPtr GetForegroundWindow(); | |
[DllImport("user32.dll")] | |
static extern bool SetFocus(IntPtr hWnd); |
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
string url = "https://myurl.com"; | |
string client_id = "client_id"; | |
string client_secret = "client_secret"; | |
//request token | |
var restclient = new RestClient(url); | |
RestRequest request = new RestRequest("request/oauth") {Method = Method.POST}; | |
request.AddHeader("Accept", "application/json"); | |
request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); | |
request.AddParameter("client_id", client_id); | |
request.AddParameter("client_secret", client_secret); |
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/#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 |
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
#gets the total download count of releases in a github repo | |
#adapted from: https://www.artificialworlds.net/blog/2015/10/16/finding-the-download-count-of-github-releases/ | |
#might stop working if the releases are too many :/ | |
curl -s https://api.github.com/repos/speckleworks/speckleinstaller/releases?per_page=100 | egrep 'download_count' | cut '-d:' -f 2 | sed 's/,/+/g' | xargs echo | sed 's/ //g' | xargs echo | xargs -I N echo N 0 | bc |
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
{ | |
"title": "Remote Desktop & TeamViewer", | |
"rules": [ | |
{ | |
"description": "Swap command and control - teocomi", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_control", |
NewerOlder