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
/// | |
/// Simple pooling for Unity. | |
/// Author: Martin "quill18" Glaude ([email protected]) | |
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
/// UPDATES: | |
/// 2015-04-16: Changed Pool to use a Stack generic. | |
/// | |
/// Usage: | |
/// |
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
:: Usage | |
:: This batch file code is used to copy the files from one computer to all other computers with in a network | |
:: Make sure you'll have the access to that computer where you wish to copy the file. | |
:: How to use it | |
:: Put all the files on the same folder where this batch file is located | |
:: Put the target.txt file on the same folder where the same batch file is located. | |
:: target.txt file should contain the target folder address in this format | |
:: "\\LAE20039\C$\Users\Ali asad\AppData\Roaming\Autodesk\Revit\Addins\2017\" |
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
string path = @"E:\FamilyBrowser\"; | |
string FullPath = @"E:\FamilyBrowser\Architecture\Annotation\Cable Tray\Fittings\Channel Horizontal Bend.rfa"; | |
// Extract file path info | |
var newpath = FullPath.Replace(path, ""); | |
newpath = newpath.Replace(".rfa", ""); | |
newpath = path + @"IMG\" + newpath; | |
// Store File Path Info | |
var fileinfo = new System.IO.FileInfo(newpath + ".png"); |
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
/// <summary> | |
/// Extract all family type properties data | |
/// </summary> | |
/// <param name="app"></param> | |
private MultiValueDictionary<string, Tuple<string, string>> ExtractFamilyParameterInfo(Application app) | |
{ | |
//Open Revit Family File in a separate document | |
var doc = app.OpenDocumentFile(FamilyPath); |
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
public class FParameterData | |
{ | |
public string Family { get; set; } | |
public string BuiltinParameter { get; set; } | |
public string ParameterType { get; set; } | |
public string ParameterName { get; set; } | |
public string ParameterValue { get; set; } | |
public string ParameterGroup { get; set; } | |
public string BuiltinGroup { get; set; } |
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
class App : IExternalApplication | |
{ | |
public static PushButton Pushbutton { get; set; } | |
public Result OnStartup(UIControlledApplication application) | |
{ | |
OnButtonCreate(application); | |
return Result.Succeeded; | |
} |
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
/// <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 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
public static class Configuration | |
{ | |
public static readonly string ArchcorpAddinFolderPath = @"O:\IT\4th Door\Ali Asad\Projects\Revit Addins\Test Archcorp Addins\"; | |
public static readonly string AutodeskRevitAddinFolderPath = $"C:\\Users\\{Environment.UserName}\\AppData\\Roaming\\Autodesk\\Revit\\Addins\\"; | |
public static readonly List<string> AutodeskVersion = new List<string> { @"2015\", @"2017\", @"2018\", @"2019\" }; | |
public static readonly string DeleteAddinNamePrefix = "delete_"; | |
} |
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
FilteredElementCollector allElementsInView = new FilteredElementCollector(document, document.ActiveView.Id); | |
IList elementsInView = (IList)allElementsInView.ToElements(); |
OlderNewer