diff --git a/.gitignore b/.gitignore index 496ee2c..df10859 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -.DS_Store \ No newline at end of file +.DS_Store + +bin/ +obj/ +.vs/ diff --git a/Main.cs b/Main.cs new file mode 100644 index 0000000..589dd3b --- /dev/null +++ b/Main.cs @@ -0,0 +1,16 @@ +using Autodesk.Navisworks.Api.Plugins; +using System.Windows.Forms; + +namespace NavisworksTransport +{ + [AddInPlugin(AddInLocation.AddIn)] // 将插件显示在Navisworks的“附加模块”选项卡中 + public class Main : AddInPlugin + { + public override int Execute(params string[] parameters) + { + MessageBox.Show("Hello from Navisworks Transport Plugin!"); + return 0; + } + + } +} diff --git a/NavisworksTransport.sln b/NavisworksTransport.sln new file mode 100644 index 0000000..e977bc4 --- /dev/null +++ b/NavisworksTransport.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36203.30 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NavisworksTransportPlugin", "NavisworksTransportPlugin.csproj", "{1A0124F6-3DEB-4153-8760-F568AD9393EE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1A0124F6-3DEB-4153-8760-F568AD9393EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A0124F6-3DEB-4153-8760-F568AD9393EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A0124F6-3DEB-4153-8760-F568AD9393EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A0124F6-3DEB-4153-8760-F568AD9393EE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EB39ED46-3E01-481E-AE51-425495B56837} + EndGlobalSection +EndGlobal diff --git a/NavisworksTransportPlugin.csproj b/NavisworksTransportPlugin.csproj new file mode 100644 index 0000000..a50431d --- /dev/null +++ b/NavisworksTransportPlugin.csproj @@ -0,0 +1,66 @@ + + + + + Debug + AnyCPU + {1A0124F6-3DEB-4153-8760-F568AD9393EE} + Library + Properties + NavisworksTransport + NavisworksTransportPlugin + v4.6.2 + 512 + true + + + true + full + false + ..\..\..\..\Program Files\Autodesk\Navisworks Manage 2017\Plugins\NavisworksTransportPlugin\ + DEBUG;TRACE + prompt + 4 + x64 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\Program Files\Autodesk\Navisworks Manage 2017\Autodesk.Navisworks.Api.dll + False + + + ..\..\..\..\Program Files\Autodesk\Navisworks Manage 2017\Autodesk.Navisworks.ComApi.dll + False + + + ..\..\..\..\Program Files\Autodesk\Navisworks Manage 2017\Autodesk.Navisworks.Interop.ComApi.dll + True + + + ..\..\..\..\Program Files\Autodesk\Navisworks Manage 2017\Autodesk.Navisworks.Interop.ComApiAutomation.dll + True + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1bc881a --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("NavisworksTransportPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NavisworksTransportPlugin")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("1a0124f6-3deb-4153-8760-f568ad9393ee")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]