├── .gitignore ├── LICENSE ├── README.md ├── addin └── RevitJumper.addin ├── image ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── release ├── 2016 │ ├── Newtonsoft.Json.dll │ └── RevitJumper.dll ├── 2018 │ ├── Newtonsoft.Json.dll │ └── RevitJumper.dll ├── 2019 │ ├── Newtonsoft.Json.dll │ └── RevitJumper.dll └── 2020 │ ├── Newtonsoft.Json.dll │ └── RevitJumper.dll ├── source ├── RevitJumper │ ├── Engines.cs │ ├── ExternalApplication.cs │ ├── JumperCommand.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Query.cs │ ├── Resources │ │ └── Image │ │ │ └── Jumper.png │ ├── RevitJumperR2016.csproj │ ├── RevitJumperR2018.csproj │ ├── RevitJumperR2019.csproj │ ├── RevitJumperR2020.csproj │ ├── UI │ │ ├── Converter │ │ │ └── BooleanVisibilityConverter.cs │ │ ├── MVVM │ │ │ └── Jumper │ │ │ │ ├── Model │ │ │ │ └── DisplayModel.cs │ │ │ │ ├── View │ │ │ │ ├── JumperWnd.xaml │ │ │ │ └── JumperWnd.xaml.cs │ │ │ │ └── ViewModel │ │ │ │ └── JumperVM.cs │ │ └── Resources │ │ │ └── Image │ │ │ └── Icon.ico │ └── WindowUtils.cs ├── RevitJumperR2016.sln ├── RevitJumperR2018.sln ├── RevitJumperR2019.sln └── RevitJumperR2020.sln └── thirdparty ├── Microsoft └── System.Windows.Interactivity.dll ├── Newtonsoft.Json ├── Newtonsoft.Json.dll └── Newtonsoft.Json.xml └── Revit ├── 2016 ├── AdWindows.dll ├── RevitAPI.dll ├── RevitAPIIFC.dll ├── RevitAPIUI.dll └── RevitAddInUtility.dll ├── 2018 ├── AdWindows.dll ├── RevitAPI.dll ├── RevitAPIIFC.dll ├── RevitAPIUI.dll ├── RevitAddInUtility.dll └── UIFrameworkServices.dll ├── 2019 ├── AdWindows.dll ├── RevitAPI.dll ├── RevitAPIIFC.dll ├── RevitAPIUI.dll ├── RevitAddInUtility.dll └── UIFrameworkServices.dll └── 2020 ├── AdWindows.dll ├── RevitAPI.dll ├── RevitAPIIFC.dll ├── RevitAPIUI.dll ├── RevitAddInUtility.dll └── UIFrameworkServices.dll /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [R]elease/ 13 | [R]eleases/ 14 | x64/ 15 | build/ 16 | bld/ 17 | [Bb]in/ 18 | [Oo]bj/ 19 | 20 | # Roslyn cache directories 21 | *.ide/ 22 | 23 | # MSTest test Results 24 | [Tt]est[Rr]esult*/ 25 | [Bb]uild[Ll]og.* 26 | 27 | #NUNIT 28 | *.VisualState.xml 29 | TestResult.xml 30 | 31 | # Build Results of an ATL Project 32 | [Dd]ebugPS/ 33 | [Rr]eleasePS/ 34 | dlldata.c 35 | .vs/ 36 | 37 | *_i.c 38 | *_p.c 39 | *_i.h 40 | *.ilk 41 | *.meta 42 | *.obj 43 | *.pch 44 | *.pdb 45 | *.pgc 46 | *.pgd 47 | *.rsp 48 | *.sbr 49 | *.tlb 50 | *.tli 51 | *.tlh 52 | *.tmp 53 | *.tmp_proj 54 | *.log 55 | *.vspscc 56 | *.vssscc 57 | .builds 58 | *.pidb 59 | *.svclog 60 | *.scc 61 | 62 | # Chutzpah Test files 63 | _Chutzpah* 64 | 65 | # Visual C++ cache files 66 | ipch/ 67 | *.aps 68 | *.ncb 69 | *.opensdf 70 | *.sdf 71 | *.cachefile 72 | 73 | # Visual Studio profiler 74 | *.psess 75 | *.vsp 76 | *.vspx 77 | 78 | # TFS 2012 Local Workspace 79 | $tf/ 80 | 81 | # Guidance Automation Toolkit 82 | *.gpState 83 | 84 | # ReSharper is a .NET coding add-in 85 | _ReSharper*/ 86 | *.[Rr]e[Ss]harper 87 | *.DotSettings.user 88 | 89 | # JustCode is a .NET coding addin-in 90 | .JustCode 91 | 92 | # TeamCity is a build add-in 93 | _TeamCity* 94 | 95 | # DotCover is a Code Coverage Tool 96 | *.dotCover 97 | 98 | # NCrunch 99 | _NCrunch_* 100 | .*crunch*.local.xml 101 | 102 | # MightyMoose 103 | *.mm.* 104 | AutoTest.Net/ 105 | 106 | # Web workbench (sass) 107 | .sass-cache/ 108 | 109 | # Installshield output folder 110 | [Ee]xpress/ 111 | 112 | # DocProject is a documentation generator add-in 113 | DocProject/buildhelp/ 114 | DocProject/Help/*.HxT 115 | DocProject/Help/*.HxC 116 | DocProject/Help/*.hhc 117 | DocProject/Help/*.hhk 118 | DocProject/Help/*.hhp 119 | DocProject/Help/Html2 120 | DocProject/Help/html 121 | 122 | # Click-Once directory 123 | publish/ 124 | 125 | # Publish Web Output 126 | *.[Pp]ublish.xml 127 | *.azurePubxml 128 | ## TODO: Comment the next line if you want to checkin your 129 | ## web deploy settings but do note that will include unencrypted 130 | ## passwords 131 | *.pubxml 132 | 133 | # NuGet Packages 134 | packages/* 135 | *.nupkg 136 | ## TODO: If the tool you use requires repositories.config 137 | ## uncomment the next line 138 | #!packages/repositories.config 139 | 140 | # Enable "build/" folder in the NuGet Packages folder since 141 | # NuGet packages use it for MSBuild targets. 142 | # This line needs to be after the ignore of the build folder 143 | # (and the packages folder if the line above has been uncommented) 144 | !packages/build/ 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | sql/ 155 | *.Cache 156 | ClientBin/ 157 | [Ss]tyle[Cc]op.* 158 | ~$* 159 | *~ 160 | *.dbmdl 161 | *.dbproj.schemaview 162 | *.publishsettings 163 | node_modules/ 164 | 165 | # RIA/Silverlight projects 166 | Generated_Code/ 167 | 168 | # Backup & report files from converting an old project file 169 | # to a newer Visual Studio version. Backup files are not needed, 170 | # because we have git ;-) 171 | _UpgradeReport_Files/ 172 | Backup*/ 173 | UpgradeLog*.XML 174 | UpgradeLog*.htm 175 | 176 | # SQL Server files 177 | *.mdf 178 | *.ldf 179 | 180 | # Business Intelligence projects 181 | *.rdl.data 182 | *.bim.layout 183 | *.bim_*.settings 184 | 185 | # Microsoft Fakes 186 | FakesAssemblies/ 187 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 bim.frankliang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## **Revit Jumper** 2 | 3 | In my daily work, I usually use RevitLookUp (Created by JeremyTammik From Autodesk) and Revitapidocs.com (Created by Gui Talarico) . 4 | 5 | I use RevitLookUp to get the keywords I want, then open the webbrowser and enter the keywords into the search box of revitapidocs or Revit API Forum to find out 6 | how to use API. 7 | 8 | I think this workflow could simplify a lot: 9 | Enter the keywords that I want to search in Revit, and returns some results immediately. 10 | These results can transfer to the corresponding page. 11 | 12 | so I born Revit Jumper. Revit jumper supports single or multi-keyword search. 13 | 14 | 15 | 16 | 17 | 18 | ---------- 19 | 20 | Author : bim.frankliang (梁裕卿) 21 | E-mail : bim.frankliang@foxmail.com 22 | Icon Design: ZeNong Gong (龚泽农) 23 | 24 | -------------------------------------------------------------------------------- /addin/RevitJumper.addin: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | RevitJumper.dll 5 | E3E1FFB2-7FA9-4025-AC6D-2EFB1A430939 6 | RevitJumper.ExternalApplication 7 | Revit Jumper 8 | bim.frankliang 9 | bim.frankliang@foxmail.com 10 | 11 | 12 | -------------------------------------------------------------------------------- /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/image/1.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/image/2.png -------------------------------------------------------------------------------- /image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/image/3.png -------------------------------------------------------------------------------- /image/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/image/4.png -------------------------------------------------------------------------------- /release/2016/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2016/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /release/2016/RevitJumper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2016/RevitJumper.dll -------------------------------------------------------------------------------- /release/2018/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2018/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /release/2018/RevitJumper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2018/RevitJumper.dll -------------------------------------------------------------------------------- /release/2019/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2019/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /release/2019/RevitJumper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2019/RevitJumper.dll -------------------------------------------------------------------------------- /release/2020/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2020/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /release/2020/RevitJumper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/release/2020/RevitJumper.dll -------------------------------------------------------------------------------- /source/RevitJumper/Engines.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Reflection; 6 | 7 | namespace RevitJumper 8 | { 9 | public enum Engines 10 | { 11 | [Description("Revitapidocs")] 12 | Revitapidocs, 13 | 14 | [Description("Revit API Forum")] 15 | RevitAPIForum, 16 | } 17 | 18 | public class DescriptionAttributeUtility 19 | { 20 | public static string GetDescriptionFromEnumValue(Enum value) 21 | { 22 | FieldInfo fieldInfo = value.GetType().GetField(value.ToString()); 23 | 24 | if (fieldInfo == null) 25 | return String.Empty; 26 | 27 | object[] customAttributes = fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false); 28 | if (!customAttributes.Any()) 29 | return String.Empty; 30 | 31 | DescriptionAttribute attribute = customAttributes.SingleOrDefault() as DescriptionAttribute; 32 | 33 | return attribute == null ? value.ToString() : attribute.Description; 34 | } 35 | 36 | public static T GetEnumValueFromDescription(string description) 37 | { 38 | var type = typeof(T); 39 | if (!type.IsEnum) 40 | throw new ArgumentException(); 41 | FieldInfo[] fields = type.GetFields(); 42 | var field = fields 43 | .SelectMany(f => f.GetCustomAttributes( 44 | typeof(DescriptionAttribute), false), ( 45 | f, a) => new { Field = f, Att = a }).SingleOrDefault(a => ((DescriptionAttribute)a.Att) 46 | .Description == description); 47 | return field == null ? default(T) : (T)field.Field.GetRawConstantValue(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /source/RevitJumper/ExternalApplication.cs: -------------------------------------------------------------------------------- 1 | #region Header 2 | // 3 | // Copyright 2019 by bim.frankliang 4 | // Icon Designed by ZeNong Gong (龚泽农) 5 | // 6 | // Permission to use, copy, modify, and distribute this software in 7 | // object code form for any purpose and without fee is hereby granted, 8 | // provided that the above copyright notice appears in all copies and 9 | // that both that copyright notice and the limited warranty and 10 | // restricted rights notice below appear in all supporting 11 | // documentation. 12 | // 13 | // Use Only For Study, Not For Commercial Use 14 | // 15 | // ID:bim.frankliang 16 | // Name: Yuqing Liang (梁裕卿) 17 | // E-mail: bim.frankliang@foxmail.com 18 | // 19 | #endregion 20 | 21 | using Autodesk.Revit.UI; 22 | using System; 23 | using System.Reflection; 24 | using System.Windows.Media.Imaging; 25 | 26 | namespace RevitJumper 27 | { 28 | public class ExternalApplication : IExternalApplication 29 | { 30 | private static readonly string assemblyName = Assembly.GetExecutingAssembly().GetName().Name; 31 | private static readonly string resourceImageFolder = $"/{assemblyName};component/Resources/Image/"; 32 | public static string ProjectName => "Revit Jumper"; 33 | public Result OnShutdown(UIControlledApplication application) 34 | { 35 | return Result.Succeeded; 36 | } 37 | 38 | public Result OnStartup(UIControlledApplication application) 39 | { 40 | if (application?.ControlledApplication == null) 41 | { 42 | return Result.Failed; 43 | } 44 | 45 | var panel = application.CreateRibbonPanel(ProjectName); 46 | var button = CreatePushButton(panel, "Jumper", "Revit Jumper"); 47 | AddButtonTip(button as RibbonItem, string.Empty, string.Empty); 48 | return Result.Succeeded; 49 | } 50 | 51 | private PushButton CreatePushButton(RibbonPanel panel, string name, string text) 52 | { 53 | if (null == panel) 54 | { 55 | return null; 56 | } 57 | PushButtonData pushButtonData = CreatePushButtonData(name, text); 58 | PushButton pushButton = panel.AddItem(pushButtonData) as PushButton; 59 | pushButton.LargeImage = LoadImage(name); 60 | return pushButton; 61 | } 62 | 63 | private PushButtonData CreatePushButtonData(string name, string text) 64 | { 65 | if (null == name || null == text) 66 | { 67 | return null; 68 | } 69 | string assemblyFilePath = Assembly.GetExecutingAssembly().Location; 70 | string className = $"{assemblyName}.{name}Command"; 71 | PushButtonData pushButtonData = new PushButtonData(name, text, assemblyFilePath, className); 72 | return pushButtonData; 73 | } 74 | 75 | private void AddButtonTip(RibbonItem item, string tooltip, string longDescription) 76 | { 77 | item.ToolTip = tooltip; 78 | item.LongDescription = longDescription; 79 | } 80 | 81 | private BitmapImage LoadImage(string imageName) 82 | { 83 | if (null == imageName) 84 | { 85 | return null; 86 | } 87 | string imageUriString = $"{resourceImageFolder}{imageName}.png"; 88 | Uri imageUri = new Uri(imageUriString, UriKind.Relative); 89 | BitmapImage bitmapImage = new BitmapImage(imageUri); 90 | return bitmapImage; 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /source/RevitJumper/JumperCommand.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.DB; 2 | using Autodesk.Revit.UI; 3 | using RevitJumper.UI.MVVM.Jumper.View; 4 | using System.Linq; 5 | 6 | namespace RevitJumper 7 | { 8 | [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] 9 | [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] 10 | public class JumperCommand : IExternalCommand 11 | { 12 | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) 13 | { 14 | var uidoc = commandData.Application.ActiveUIDocument; 15 | var version = commandData.Application.Application.VersionNumber; 16 | var doc = uidoc.Document; 17 | var elemIds = uidoc.Selection.GetElementIds(); 18 | var wnd = new JumperWnd(doc, elemIds.ToList(), version); 19 | wnd.ShowHostDialog(); 20 | return Result.Succeeded; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source/RevitJumper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("RevitJumper")] 9 | [assembly: AssemblyDescription("A Revit Tool which swift jump to www.revitapidocs.com")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("bim.frankliang@foxmail.com")] 12 | [assembly: AssemblyProduct("RevitJumper")] 13 | [assembly: AssemblyCopyright("Copyright © bim.frankliang 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("1e37162e-619f-43c3-b950-158bea30b2e1")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /source/RevitJumper/Query.cs: -------------------------------------------------------------------------------- 1 |  2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Linq; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Net; 7 | using System.Net.Http; 8 | 9 | namespace RevitJumper 10 | { 11 | public class Query 12 | { 13 | private static readonly string apidocumenturl = "https://ac.cnstrc.com/autocomplete"; 14 | private static readonly string apiforumurl = "https://forums.autodesk.com/t5/forums/forumpage.searchformv3.messagesearchfield.messagesearchfield:autocomplete"; 15 | public List GetSearchResult(string query, string engine) 16 | { 17 | var results = new List(); 18 | var geturl = string.Empty; 19 | if (engine.Equals(DescriptionAttributeUtility.GetDescriptionFromEnumValue(Engines.Revitapidocs))) 20 | { 21 | geturl = $"{apidocumenturl}/{query}?autocomplete_key=key_yyAC1mb0cTgZTwSo&c=ciojs-1.57.1&num_results=30&i=62b7b575-880d-48a0-98e7-90ef437be6c1&s=3&query={query}&_dt=1572328914509"; 22 | try 23 | { 24 | var httpresult = new HttpClient().GetAsync(new Uri(geturl)).Result; 25 | var result = httpresult.Content.ReadAsStringAsync().Result; 26 | JObject jo = (JObject)JsonConvert.DeserializeObject(result); 27 | var sections = jo["sections"].ToString(); 28 | JObject products = (JObject)JsonConvert.DeserializeObject(sections); 29 | var productsinfo = products["Products"].ToString(); 30 | var array = JArray.Parse(productsinfo); 31 | if (array != null) 32 | { 33 | foreach (var info in array) 34 | { 35 | var relatedkey = info["value"].ToString(); 36 | var data = info["data"].ToString(); 37 | JObject datas = (JObject)JsonConvert.DeserializeObject(data); 38 | var description = datas["description"].ToString(); 39 | var url = datas["url"].ToString(); 40 | 41 | var model = new SearchResult() 42 | { 43 | RelatedKey = relatedkey, 44 | Description = description, 45 | Url = url, 46 | }; 47 | results.Add(model); 48 | } 49 | } 50 | } 51 | catch 52 | { 53 | 54 | } 55 | } 56 | else if (engine.Equals(DescriptionAttributeUtility.GetDescriptionFromEnumValue(Engines.RevitAPIForum))) 57 | { 58 | geturl = $"{apiforumurl}?t:ac=board-id/160&t:cp=search/contributions/page&q={query}&searchContext=160%7Cforum-board"; 59 | try 60 | { 61 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 62 | var httpresult = new HttpClient().GetAsync(new Uri(geturl)).Result; 63 | var result = httpresult.Content.ReadAsStringAsync().Result; 64 | var array = JArray.Parse(result); 65 | if (array != null) 66 | { 67 | foreach (var info in array) 68 | { 69 | var relatedkey = info["result"].ToString(); 70 | var data = info["value"].ToString(); 71 | JObject datas = (JObject)JsonConvert.DeserializeObject(data); 72 | var url = datas["url"].ToString(); 73 | 74 | var model = new SearchResult() 75 | { 76 | RelatedKey = relatedkey, 77 | Description = string.Empty, 78 | Url = url, 79 | }; 80 | results.Add(model); 81 | } 82 | } 83 | } 84 | catch(Exception ex) 85 | { 86 | 87 | } 88 | } 89 | return results; 90 | } 91 | 92 | public void GoSearch(string engine, string version ,string url) 93 | { 94 | var finalurl = string.Empty; 95 | if (engine.Equals(DescriptionAttributeUtility.GetDescriptionFromEnumValue(Engines.Revitapidocs))) 96 | { 97 | var revitdocs = "https://www.revitapidocs.com"; 98 | finalurl = $"{revitdocs}/{version}/{url}"; 99 | } 100 | else if(engine.Equals(DescriptionAttributeUtility.GetDescriptionFromEnumValue(Engines.RevitAPIForum))) 101 | { 102 | finalurl = url; 103 | } 104 | if (!string.IsNullOrEmpty(finalurl) && !string.IsNullOrWhiteSpace(finalurl)) 105 | { 106 | System.Diagnostics.Process.Start(finalurl); 107 | } 108 | } 109 | } 110 | 111 | public class SearchResult 112 | { 113 | public string RelatedKey { get; set; } 114 | public string Description { get; set; } 115 | public string Url { get; set; } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /source/RevitJumper/Resources/Image/Jumper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BIMCoderLiang/RevitJumper/dc453a71d8587f2def66f6c6d311de93a7c81ff5/source/RevitJumper/Resources/Image/Jumper.png -------------------------------------------------------------------------------- /source/RevitJumper/RevitJumperR2016.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1E37162E-619F-43C3-B950-158BEA30B2E1} 8 | Library 9 | Properties 10 | RevitJumper 11 | RevitJumper 12 | v4.5 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | ..\..\bin\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | ..\..\bin\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | ..\..\thirdparty\Newtonsoft.Json\Newtonsoft.Json.dll 38 | 39 | 40 | 41 | 42 | False 43 | ..\..\thirdparty\Revit\2016\RevitAPI.dll 44 | False 45 | 46 | 47 | False 48 | ..\..\thirdparty\Revit\2016\RevitAPIUI.dll 49 | False 50 | 51 | 52 | 53 | 54 | ..\..\thirdparty\Microsoft\System.Windows.Interactivity.dll 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | JumperWnd.xaml 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | Designer 86 | MSBuild:Compile 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /source/RevitJumper/RevitJumperR2018.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1E37162E-619F-43C3-B950-158BEA30B2E1} 8 | Library 9 | Properties 10 | RevitJumper 11 | RevitJumper 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | ..\..\bin\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | ..\..\bin\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | False 36 | ..\..\thirdparty\Newtonsoft.Json\Newtonsoft.Json.dll 37 | 38 | 39 | 40 | 41 | ..\..\thirdparty\Revit\2018\RevitAPI.dll 42 | False 43 | 44 | 45 | ..\..\thirdparty\Revit\2018\RevitAPIUI.dll 46 | False 47 | 48 | 49 | 50 | 51 | ..\..\thirdparty\Microsoft\System.Windows.Interactivity.dll 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | JumperWnd.xaml 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | Designer 82 | MSBuild:Compile 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /source/RevitJumper/RevitJumperR2019.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1E37162E-619F-43C3-B950-158BEA30B2E1} 8 | Library 9 | Properties 10 | RevitJumper 11 | RevitJumper 12 | v4.7 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | ..\..\bin\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | ..\..\bin\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | ..\..\thirdparty\Newtonsoft.Json\Newtonsoft.Json.dll 38 | 39 | 40 | 41 | 42 | False 43 | ..\..\thirdparty\Revit\2019\RevitAPI.dll 44 | False 45 | 46 | 47 | False 48 | ..\..\thirdparty\Revit\2019\RevitAPIUI.dll 49 | False 50 | 51 | 52 | 53 | 54 | ..\..\thirdparty\Microsoft\System.Windows.Interactivity.dll 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | JumperWnd.xaml 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Designer 85 | MSBuild:Compile 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /source/RevitJumper/RevitJumperR2020.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1E37162E-619F-43C3-B950-158BEA30B2E1} 8 | Library 9 | Properties 10 | RevitJumper 11 | RevitJumper 12 | v4.7 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | ..\..\bin\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | ..\..\bin\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | ..\..\thirdparty\Newtonsoft.Json\Newtonsoft.Json.dll 38 | 39 | 40 | 41 | 42 | False 43 | ..\..\thirdparty\Revit\2020\RevitAPI.dll 44 | False 45 | 46 | 47 | False 48 | ..\..\thirdparty\Revit\2020\RevitAPIUI.dll 49 | False 50 | 51 | 52 | 53 | 54 | ..\..\thirdparty\Microsoft\System.Windows.Interactivity.dll 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | JumperWnd.xaml 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Designer 85 | MSBuild:Compile 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /source/RevitJumper/UI/Converter/BooleanVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace RevitJumper.UI.Converter 7 | { 8 | [ValueConversion(typeof(bool), typeof(Visibility))] 9 | public class BooleanVisibilityConverter : IValueConverter 10 | { 11 | #region IValueConverter Members 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if (targetType != typeof(Visibility)) 16 | throw new InvalidOperationException("The target must be a boolean"); 17 | 18 | bool boolValue = (bool)value; 19 | return boolValue ? Visibility.Visible : Visibility.Collapsed; 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | throw new NotSupportedException(); 25 | } 26 | 27 | #endregion 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /source/RevitJumper/UI/MVVM/Jumper/Model/DisplayModel.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace RevitJumper.UI.MVVM.Jumper.Model 3 | { 4 | public class DisplayModel 5 | { 6 | public string RelatedKey { get; set; } 7 | public string Description { get; set; } 8 | public string Url { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /source/RevitJumper/UI/MVVM/Jumper/View/JumperWnd.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 54 | 55 | 56 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |