Skip to content

Commit 45b007b

Browse files
authored
Merge pull request #40 from EverseDevelopment/develop
New feature added
2 parents dc1ace6 + e603232 commit 45b007b

File tree

5 files changed

+84
-59
lines changed

5 files changed

+84
-59
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
using Autodesk.Navisworks.Api.Plugins;
2+
using System.Diagnostics;
3+
using System;
24

35
namespace EVerse.Navisworks.SelectByRevitId.Common.Application
46
{
57
class CommonCommandHandlerPlugin : CommandHandlerPlugin
68
{
79
public override int ExecuteCommand(string name, params string[] parameters) { return 0; }
10+
public override bool TryShowCommandHelp(string name)
11+
{
12+
Redirect(name);
13+
return true;
14+
}
15+
static void Redirect(string url)
16+
{
17+
try
18+
{
19+
Process.Start(url);
20+
}
21+
catch (Exception ex)
22+
{
23+
Console.WriteLine("Failed to redirect: " + ex.Message);
24+
}
25+
}
826
}
927
}

e-verse.Navisworks.SelectByRevitId.Common/PluginRibbon.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010
namespace EVerse.Navisworks.Plugin.Common
1111
{
12-
[Plugin("SelectByRevitIdRibbon", IdentityInformation.DeveloperID, DisplayName = "Select by revit ID")]
12+
[Plugin("SelectByRevitIdRibbon", IdentityInformation.DeveloperID, DisplayName = "Select by ID")]
1313
[RibbonLayout("PluginRibbon.xaml")]
1414
[RibbonTab("SelectByRevitId")]
15-
[Command("SelectByRevitId", LargeIcon = "RID_32.jpg", ToolTip = "Select by revit ID", DisplayName = "Select by revit ID")]
15+
[Command("SelectByRevitId", LargeIcon = "RID_32.jpg", ToolTip = "Select by Revit ID\n\nPris is a Select by Revit ID add-in for Autodesk® Navisworks®. It allows users to easily select specific element in a Navisworks model based on its unique Revit ID.", DisplayName = "Select by ID")]
1616
class PluginRibbon : CommonCommandHandlerPlugin
1717
{
18+
public const string PRIS = "pris";
1819
public override int ExecuteCommand(string name, params string[] parameters)
1920
{
2021
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
@@ -43,5 +44,11 @@ public override int ExecuteCommand(string name, params string[] parameters)
4344
}
4445
return 0;
4546
}
47+
48+
public override bool TryShowCommandHelp(string name)
49+
{
50+
bool result = base.TryShowCommandHelp($"https://e-verse.com/{PRIS}");
51+
return result;
52+
}
4653
}
4754
}

0 commit comments

Comments
 (0)