├── .gitignore
├── NwLookup.sln
├── NwLookup.v17
├── Application.cs
├── NwLookup.v17.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Snoop
│ └── Collectors
│ │ ├── CustomCollector.cs
│ │ └── ModelItemStreamPass.cs
├── en-US
│ ├── NwLookupDefinitions.txt
│ └── NwLookupLayout.xaml
├── lib
│ ├── Autodesk.Navisworks.Api.dll
│ ├── Autodesk.Navisworks.ComApi.dll
│ └── Autodesk.Navisworks.Interop.ComApi.dll
├── packages.config
└── resources
│ ├── mg_16x16.ico
│ └── mg_32x32.ico
├── NwLookup.v18
├── Application.cs
├── NwLookup.v18.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Snoop
│ └── Collectors
│ │ ├── CustomCollector.cs
│ │ └── ModelItemStreamPass.cs
├── en-US
│ ├── NwLookupDefinitions.txt
│ └── NwLookupLayout.xaml
├── lib
│ ├── Autodesk.Navisworks.Api.dll
│ ├── Autodesk.Navisworks.ComApi.dll
│ └── Autodesk.Navisworks.Interop.ComApi.dll
├── packages.config
└── resources
│ ├── mg_16x16.ico
│ └── mg_32x32.ico
├── NwLookup.v19
├── Application.cs
├── NwLookup.v19.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Snoop
│ └── Collectors
│ │ ├── CustomCollector.cs
│ │ └── ModelItemStreamPass.cs
├── en-US
│ ├── NwLookupDefinitions.txt
│ └── NwLookupLayout.xaml
├── lib
│ ├── Autodesk.Navisworks.Api.dll
│ ├── Autodesk.Navisworks.ComApi.dll
│ └── Autodesk.Navisworks.Interop.ComApi.dll
└── resources
│ ├── mg_16x16.ico
│ └── mg_32x32.ico
├── NwLookup.v20
├── Application.cs
├── NwLookup.v20.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Snoop
│ └── Collectors
│ │ ├── CustomCollector.cs
│ │ └── ModelItemStreamPass.cs
├── en-US
│ ├── NwLookupDefinitions.txt
│ └── NwLookupLayout.xaml
├── lib
│ ├── Autodesk.Navisworks.Api.dll
│ ├── Autodesk.Navisworks.ComApi.dll
│ └── Autodesk.Navisworks.Interop.ComApi.dll
└── resources
│ ├── mg_16x16.ico
│ └── mg_32x32.ico
├── NwLookup.v21
├── Application.cs
├── NwLookup.v21.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Snoop
│ └── Collectors
│ │ ├── CustomCollector.cs
│ │ └── ModelItemStreamPass.cs
├── en-US
│ ├── NwLookupDefinitions.txt
│ └── NwLookupLayout.xaml
├── lib
│ ├── Autodesk.Navisworks.Api.dll
│ ├── Autodesk.Navisworks.ComApi.dll
│ └── Autodesk.Navisworks.Interop.ComApi.dll
└── resources
│ ├── mg_16x16.ico
│ └── mg_32x32.ico
├── NwLookup
├── NwLookup.csproj
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
└── Snoop
│ ├── Collectors
│ ├── Collector.cs
│ ├── DefaultStreamPass.cs
│ ├── ICollector.cs
│ ├── IMemberStream.cs
│ ├── IStreamPass.cs
│ ├── MemberStream.cs
│ ├── MethodStream.cs
│ ├── PropertyStream.cs
│ ├── ReflectionUtils.cs
│ └── StreamPassBase.cs
│ ├── Datas
│ ├── Data.cs
│ ├── DataArray.cs
│ ├── DataFactory.cs
│ ├── DefaultData.cs
│ ├── ExceptionData.cs
│ ├── MethodData.cs
│ └── PrimitiveData.cs
│ └── Views
│ ├── Controls
│ └── AutoSizedGridView.cs
│ ├── Models
│ ├── NotifyViewModelBase.cs
│ └── RelayCommand.cs
│ ├── SnoopViewModel.cs
│ ├── SnoopWindow.xaml
│ ├── SnoopWindow.xaml.cs
│ ├── TypesViewModel.cs
│ ├── TypesWindow.xaml
│ └── TypesWindow.xaml.cs
├── NwLookup_Setup
├── Assets
│ ├── Banner.bmp
│ ├── Licence.md
│ ├── Licence.rtf
│ ├── Main.bmp
│ └── icon.ico
├── Common.wxl
├── Directories.wxs
├── Files.wxs
├── NwLookup.msi
├── NwLookup_Setup.wixproj
└── Product.wxs
├── PackageContents.xml
├── README.md
├── Tools
├── Build.events
└── ExtraCleanup.targets
└── exclude.txt
/.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 | [Rr]elease/
13 | [Rr]eleases/
14 | x64/
15 | x86/
16 | bld/
17 | [Bb]in/
18 | [Oo]bj/
19 | build/
20 |
21 | # Roslyn cache directories
22 | *.ide/
23 | .vs/
24 |
25 | # MSTest test Results
26 | [Tt]est[Rr]esult*/
27 | [Bb]uild[Ll]og.*
28 |
29 | # NUnit
30 | *.VisualState.xml
31 | TestResult.xml
32 | nunit-*.xml
33 |
34 | # Build Results of an ATL Project
35 | [Dd]ebugPS/
36 | [Rr]eleasePS/
37 | dlldata.c
38 |
39 | *_i.c
40 | *_p.c
41 | *_i.h
42 | *.ilk
43 | *.meta
44 | *.obj
45 | *.pch
46 | *.pdb
47 | *.pgc
48 | *.pgd
49 | *.rsp
50 | *.sbr
51 | *.tlb
52 | *.tli
53 | *.tlh
54 | *.tmp
55 | *.tmp_proj
56 | *.log
57 | *.vspscc
58 | *.vssscc
59 | .builds
60 | *.pidb
61 | *.svclog
62 | *.scc
63 |
64 | # Chutzpah Test files
65 | _Chutzpah*
66 |
67 | # Visual C++ cache files
68 | ipch/
69 | *.aps
70 | *.ncb
71 | *.opensdf
72 | *.sdf
73 | *.cachefile
74 |
75 | # Visual Studio profiler
76 | *.psess
77 | *.vsp
78 | *.vspx
79 |
80 | # TFS 2012 Local Workspace
81 | $tf/
82 |
83 | # Guidance Automation Toolkit
84 | *.gpState
85 |
86 | # ReSharper is a .NET coding add-in
87 | _ReSharper*/
88 | *.[Rr]e[Ss]harper
89 | *.DotSettings.user
90 |
91 | # JustCode is a .NET coding addin-in
92 | .JustCode
93 |
94 | # TeamCity is a build add-in
95 | _TeamCity*
96 |
97 | # DotCover is a Code Coverage Tool
98 | *.dotCover
99 |
100 | # NCrunch
101 | _NCrunch_*
102 | .*crunch*.local.xml
103 |
104 | # MightyMoose
105 | *.mm.*
106 | AutoTest.Net/
107 |
108 | # Web workbench (sass)
109 | .sass-cache/
110 |
111 | # Installshield output folder
112 | [Ee]xpress/
113 |
114 | # DocProject is a documentation generator add-in
115 | DocProject/buildhelp/
116 | DocProject/Help/*.HxT
117 | DocProject/Help/*.HxC
118 | DocProject/Help/*.hhc
119 | DocProject/Help/*.hhk
120 | DocProject/Help/*.hhp
121 | DocProject/Help/Html2
122 | DocProject/Help/html
123 |
124 | # Click-Once directory
125 | publish/
126 |
127 | # Publish Web Output
128 | *.[Pp]ublish.xml
129 | *.azurePubxml
130 | # TODO: Comment the next line if you want to checkin your web deploy settings
131 | # but database connection strings (with potential passwords) will be unencrypted
132 | *.pubxml
133 | *.publishproj
134 |
135 | # NuGet Packages
136 | *.nupkg
137 | # The packages folder can be ignored because of Package Restore
138 | **/packages/*
139 | # except build/, which is used as an MSBuild target.
140 | !**/packages/build/
141 | # If using the old MSBuild-Integrated Package Restore, uncomment this:
142 | #!**/packages/repositories.config
143 | Packages.dgml
144 |
145 | # Windows Azure Build Output
146 | csx/
147 | *.build.csdef
148 |
149 | # Windows Store app package directory
150 | AppPackages/
151 |
152 | # Others
153 | sql/
154 | *.Cache
155 | ClientBin/
156 | [Ss]tyle[Cc]op.*
157 | ~$*
158 | *~
159 | *.dbmdl
160 | *.dbproj.schemaview
161 | *.pfx
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 |
188 | # =========================
189 | # Operating System Files
190 | # =========================
191 |
192 | # OSX
193 | # =========================
194 |
195 | .DS_Store
196 | .AppleDouble
197 | .LSOverride
198 |
199 | # Icon must end with two \r
200 | Icon
201 |
202 |
203 | # Thumbnails
204 | ._*
205 |
206 | # Files that might appear on external disk
207 | .Spotlight-V100
208 | .Trashes
209 |
210 | # Directories potentially created on remote AFP share
211 | .AppleDB
212 | .AppleDesktop
213 | Network Trash Folder
214 | Temporary Items
215 | .apdisk
216 |
217 | # Windows
218 | # =========================
219 |
220 | # Windows image file caches
221 | Thumbs.db
222 | ehthumbs.db
223 |
224 | # Folder config file
225 | Desktop.ini
226 |
227 | # Recycle Bin used on file shares
228 | $RECYCLE.BIN/
229 |
230 | # Windows Installer files
231 | *.cab
232 | # *.msi
233 | *.msm
234 | *.msp
235 |
236 | #OpenCover output
237 | coverage.xml
238 |
239 | #Msbuild binary log output
240 | output.binlog
241 |
242 | # KDiff3
243 | *_BACKUP_*
244 | *_BASE_*
245 | *_LOCAL_*
246 | *_REMOTE_*
247 | *.orig
248 |
249 | AkavacheSqliteLinkerOverride.cs
250 | NuGetBuild
251 | WiX.Toolset.DummyFile.txt
252 | GitHubVS.sln.DotSettings
--------------------------------------------------------------------------------
/NwLookup.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30907.101
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NwLookup.v18", "NwLookup.v18\NwLookup.v18.csproj", "{B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NwLookup", "NwLookup\NwLookup.csproj", "{875544E5-CD02-4E38-8E32-3016EDF47027}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7E9299A8-446F-4A8A-9FEC-C1B6869FDCE3}"
11 | ProjectSection(SolutionItems) = preProject
12 | PackageContents.xml = PackageContents.xml
13 | EndProjectSection
14 | EndProject
15 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NwLookup.v17", "NwLookup.v17\NwLookup.v17.csproj", "{5D2D6A6B-3BEF-40E9-B151-09B346800648}"
16 | EndProject
17 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NwLookup.v21", "NwLookup.v21\NwLookup.v21.csproj", "{944F3E88-538E-4797-B8D5-42204F60042A}"
18 | EndProject
19 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NwLookup.v19", "NwLookup.v19\NwLookup.v19.csproj", "{1EB9F9F4-C4FE-455F-BA41-950901E38D08}"
20 | EndProject
21 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NwLookup.v20", "NwLookup.v20\NwLookup.v20.csproj", "{D3DB9547-E3D2-443F-84F9-798E3C92FC7F}"
22 | EndProject
23 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "NwLookup_Setup", "NwLookup_Setup\NwLookup_Setup.wixproj", "{0CEA8009-A942-43B4-8E1D-22610289F902}"
24 | EndProject
25 | Global
26 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
27 | Debug|x64 = Debug|x64
28 | Debug|x86 = Debug|x86
29 | Release|x64 = Release|x64
30 | Release|x86 = Release|x86
31 | EndGlobalSection
32 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
33 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}.Debug|x64.ActiveCfg = Debug|x64
34 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}.Debug|x64.Build.0 = Debug|x64
35 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}.Debug|x86.ActiveCfg = Debug|x64
36 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}.Release|x64.ActiveCfg = Release|x64
37 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}.Release|x64.Build.0 = Release|x64
38 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}.Release|x86.ActiveCfg = Release|x64
39 | {875544E5-CD02-4E38-8E32-3016EDF47027}.Debug|x64.ActiveCfg = Debug|x64
40 | {875544E5-CD02-4E38-8E32-3016EDF47027}.Debug|x64.Build.0 = Debug|x64
41 | {875544E5-CD02-4E38-8E32-3016EDF47027}.Debug|x86.ActiveCfg = Debug|x64
42 | {875544E5-CD02-4E38-8E32-3016EDF47027}.Release|x64.ActiveCfg = Release|x64
43 | {875544E5-CD02-4E38-8E32-3016EDF47027}.Release|x64.Build.0 = Release|x64
44 | {875544E5-CD02-4E38-8E32-3016EDF47027}.Release|x86.ActiveCfg = Release|x64
45 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}.Debug|x64.ActiveCfg = Debug|x64
46 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}.Debug|x64.Build.0 = Debug|x64
47 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}.Debug|x86.ActiveCfg = Debug|x64
48 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}.Release|x64.ActiveCfg = Release|x64
49 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}.Release|x64.Build.0 = Release|x64
50 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}.Release|x86.ActiveCfg = Release|x64
51 | {944F3E88-538E-4797-B8D5-42204F60042A}.Debug|x64.ActiveCfg = Debug|x64
52 | {944F3E88-538E-4797-B8D5-42204F60042A}.Debug|x64.Build.0 = Debug|x64
53 | {944F3E88-538E-4797-B8D5-42204F60042A}.Debug|x86.ActiveCfg = Debug|x64
54 | {944F3E88-538E-4797-B8D5-42204F60042A}.Release|x64.ActiveCfg = Release|x64
55 | {944F3E88-538E-4797-B8D5-42204F60042A}.Release|x64.Build.0 = Release|x64
56 | {944F3E88-538E-4797-B8D5-42204F60042A}.Release|x86.ActiveCfg = Release|x64
57 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}.Debug|x64.ActiveCfg = Debug|x64
58 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}.Debug|x64.Build.0 = Debug|x64
59 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}.Debug|x86.ActiveCfg = Debug|x64
60 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}.Release|x64.ActiveCfg = Release|x64
61 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}.Release|x64.Build.0 = Release|x64
62 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}.Release|x86.ActiveCfg = Release|x64
63 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}.Debug|x64.ActiveCfg = Debug|x64
64 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}.Debug|x64.Build.0 = Debug|x64
65 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}.Debug|x86.ActiveCfg = Debug|x64
66 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}.Release|x64.ActiveCfg = Release|x64
67 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}.Release|x64.Build.0 = Release|x64
68 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}.Release|x86.ActiveCfg = Release|x64
69 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Debug|x64.ActiveCfg = Debug|x86
70 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Debug|x86.ActiveCfg = Debug|x86
71 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Debug|x86.Build.0 = Debug|x86
72 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Release|x64.ActiveCfg = Release|x86
73 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Release|x64.Build.0 = Release|x86
74 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Release|x86.ActiveCfg = Release|x86
75 | {0CEA8009-A942-43B4-8E1D-22610289F902}.Release|x86.Build.0 = Release|x86
76 | EndGlobalSection
77 | GlobalSection(SolutionProperties) = preSolution
78 | HideSolutionNode = FALSE
79 | EndGlobalSection
80 | GlobalSection(ExtensibilityGlobals) = postSolution
81 | SolutionGuid = {A5C1E327-5E14-498C-AA68-35E5B6508740}
82 | EndGlobalSection
83 | EndGlobal
84 |
--------------------------------------------------------------------------------
/NwLookup.v17/Application.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Autodesk.Navisworks.Api;
4 | using Autodesk.Navisworks.Api.Plugins;
5 |
6 | using NwLookup.Snoop.Datas;
7 | using NwLookup.v17.Snoop.Collectors;
8 |
9 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
10 |
11 | namespace NwLookup.v17
12 | {
13 | [Plugin("NwLookup.v17.Application", "AMCC", DisplayName = "Snoop")]
14 | [Strings("NwLookupDefinitions.txt")]
15 | [RibbonLayout("NwLookupLayout.xaml")]
16 | [RibbonTab("ID_NWLOOKUP_TAB")]
17 | [Command("NWLOOKUP_SNOOP_COMMAND",
18 | Icon = "resources\\mg_16x16.ico",
19 | LargeIcon = "resources\\mg_32x32.ico",
20 | CallCanExecute = CallCanExecute.Always,
21 | CanToggle = true,
22 | LoadForCanExecute = true)]
23 | public class Application : CommandHandlerPlugin
24 | {
25 | public override int ExecuteCommand(string name, params string[] parameters)
26 | {
27 | switch (name)
28 | {
29 | case "NWLOOKUP_SNOOP_COMMAND":
30 | NwLookupCommand();
31 | break;
32 | default:
33 | break;
34 | }
35 |
36 | return 0;
37 | }
38 |
39 | public override CommandState CanExecuteCommand(string name)
40 | {
41 | switch (name)
42 | {
43 | case "NWLOOKUP_SNOOP_COMMAND":
44 | return new CommandState(true);
45 | default:
46 | throw new NotImplementedException(
47 | string.Format("Command with name {0} is not implemented", name)
48 | );
49 | }
50 | }
51 |
52 | private void NwLookupCommand()
53 | {
54 | // Force loading of the Interop.ComApi assembly so that it will be included when
55 | // the 'Types' call is made in reflection utils
56 | GC.KeepAlive(typeof(ComApi.InwBase));
57 | Document document = Autodesk.Navisworks.Api.Application.ActiveDocument;
58 | Data data;
59 | if (document.CurrentSelection.SelectedItems.IsEmpty)
60 | data = DataFactory.Create(document);
61 | else
62 | data = DataFactory.Create(document.CurrentSelection.SelectedItems);
63 | data.Snoop(new CustomCollector());
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/NwLookup.v17/NwLookup.v17.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {5D2D6A6B-3BEF-40E9-B151-09B346800648}
6 | Library
7 | Properties
8 | NwLookup.v17
9 | NwLookup.v17
10 | v4.5.2
11 | 512
12 | true
13 | 2017
14 |
15 |
16 | true
17 | bin\x64\Debug\
18 | DEBUG;TRACE
19 | full
20 | x64
21 | prompt
22 | MinimumRecommendedRules.ruleset
23 | 7.3
24 |
25 |
26 | bin\x64\Release\
27 | TRACE
28 | true
29 | pdbonly
30 | x64
31 | prompt
32 | MinimumRecommendedRules.ruleset
33 | 7.3
34 |
35 |
36 |
37 | False
38 | lib\Autodesk.Navisworks.Api.dll
39 | False
40 |
41 |
42 | False
43 | lib\Autodesk.Navisworks.ComApi.dll
44 | False
45 |
46 |
47 | False
48 | False
49 | lib\Autodesk.Navisworks.Interop.ComApi.dll
50 | False
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | ..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | {875544e5-cd02-4e38-8e32-3016edf47027}
82 | NwLookup
83 |
84 |
85 |
86 |
87 | PreserveNewest
88 |
89 |
90 |
91 |
92 | MSBuild:Compile
93 | Designer
94 | PreserveNewest
95 |
96 |
97 |
98 |
99 | PreserveNewest
100 |
101 |
102 | PreserveNewest
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/NwLookup.v17/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NwLookup.v17")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("AMCC")]
12 | [assembly: AssemblyProduct("NwLookup.v17")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5D2D6A6B-3BEF-40E9-B151-09B346800648")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/NwLookup.v17/Snoop/Collectors/CustomCollector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Collectors;
4 |
5 | namespace NwLookup.v17.Snoop.Collectors
6 | {
7 | public class CustomCollector : Collector
8 | {
9 | public CustomCollector()
10 | : base(new List{
11 | new DefaultStreamPass(),
12 | new ModelItemStreamPass()
13 | })
14 | { }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/NwLookup.v17/Snoop/Collectors/ModelItemStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 | using NwLookup.Snoop.Collectors;
5 |
6 | using Autodesk.Navisworks.Api;
7 |
8 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
9 | using ComBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge;
10 |
11 | namespace NwLookup.v17.Snoop.Collectors
12 | {
13 | public class ModelItemStreamPass : StreamPassBase
14 | {
15 | public override bool CanRun(object obj)
16 | => obj is ModelItem;
17 |
18 | public override void Stream(IList datas, object obj)
19 | {
20 | ComApi.InwOaPath path = ComBridge.ToInwOaPath((ModelItem)obj);
21 | StreamInternal(datas, path);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/NwLookup.v17/en-US/NwLookupDefinitions.txt:
--------------------------------------------------------------------------------
1 | # Local names for ribbon tab, panel, and controls
2 | $utf8
3 |
4 | ID_NWLOOKUP_TAB.DisplayName=NwLookup
5 |
6 | NWLOOKUP_SNOOP_COMMAND.DisplayName=Snoop
7 |
--------------------------------------------------------------------------------
/NwLookup.v17/en-US/NwLookupLayout.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/NwLookup.v17/lib/Autodesk.Navisworks.Api.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v17/lib/Autodesk.Navisworks.Api.dll
--------------------------------------------------------------------------------
/NwLookup.v17/lib/Autodesk.Navisworks.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v17/lib/Autodesk.Navisworks.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v17/lib/Autodesk.Navisworks.Interop.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v17/lib/Autodesk.Navisworks.Interop.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v17/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/NwLookup.v17/resources/mg_16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v17/resources/mg_16x16.ico
--------------------------------------------------------------------------------
/NwLookup.v17/resources/mg_32x32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v17/resources/mg_32x32.ico
--------------------------------------------------------------------------------
/NwLookup.v18/Application.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Autodesk.Navisworks.Api;
4 | using Autodesk.Navisworks.Api.Plugins;
5 |
6 | using NwLookup.Snoop.Datas;
7 | using NwLookup.v18.Snoop.Collectors;
8 |
9 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
10 |
11 | namespace NwLookup.v18
12 | {
13 | [Plugin("NwLookup.v18.Application", "AMCC", DisplayName = "Snoop")]
14 | [Strings("NwLookupDefinitions.txt")]
15 | [RibbonLayout("NwLookupLayout.xaml")]
16 | [RibbonTab("ID_NWLOOKUP_TAB")]
17 | [Command("NWLOOKUP_SNOOP_COMMAND",
18 | Icon = "resources\\mg_16x16.ico",
19 | LargeIcon = "resources\\mg_32x32.ico",
20 | CallCanExecute = CallCanExecute.Always,
21 | CanToggle = true,
22 | LoadForCanExecute = true)]
23 | public class Application : CommandHandlerPlugin
24 | {
25 | public override int ExecuteCommand(string name, params string[] parameters)
26 | {
27 | switch (name)
28 | {
29 | case "NWLOOKUP_SNOOP_COMMAND":
30 | NwLookupCommand();
31 | break;
32 | default:
33 | break;
34 | }
35 |
36 | return 0;
37 | }
38 |
39 | public override CommandState CanExecuteCommand(string name)
40 | {
41 | switch (name)
42 | {
43 | case "NWLOOKUP_SNOOP_COMMAND":
44 | return new CommandState(true);
45 | default:
46 | throw new NotImplementedException(
47 | string.Format("Command with name {0} is not implemented", name)
48 | );
49 | }
50 | }
51 |
52 | private void NwLookupCommand()
53 | {
54 | // Force loading of the Interop.ComApi assembly so that it will be included when
55 | // the 'Types' call is made in reflection utils
56 | GC.KeepAlive(typeof(ComApi.InwBase));
57 | Document document = Autodesk.Navisworks.Api.Application.ActiveDocument;
58 | Data data;
59 | if (document.CurrentSelection.SelectedItems.IsEmpty)
60 | data = DataFactory.Create(document);
61 | else
62 | data = DataFactory.Create(document.CurrentSelection.SelectedItems);
63 | data.Snoop(new CustomCollector());
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/NwLookup.v18/NwLookup.v18.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {B0C56007-B6E4-4A89-8E61-D37D2AFE8BE0}
6 | Library
7 | Properties
8 | NwLookup.v18
9 | NwLookup.v18
10 | v4.5.2
11 | 512
12 | true
13 | 2018
14 |
15 |
16 | true
17 | bin\x64\Debug\
18 | DEBUG;TRACE
19 | full
20 | x64
21 | prompt
22 | MinimumRecommendedRules.ruleset
23 | 7.3
24 |
25 |
26 | bin\x64\Release\
27 | TRACE
28 | true
29 | pdbonly
30 | x64
31 | prompt
32 | MinimumRecommendedRules.ruleset
33 | 7.3
34 |
35 |
36 |
37 | False
38 | lib\Autodesk.Navisworks.Api.dll
39 | False
40 |
41 |
42 | False
43 | lib\Autodesk.Navisworks.ComApi.dll
44 | False
45 |
46 |
47 | False
48 | False
49 | lib\Autodesk.Navisworks.Interop.ComApi.dll
50 | False
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | ..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | {875544e5-cd02-4e38-8e32-3016edf47027}
82 | NwLookup
83 |
84 |
85 |
86 |
87 | PreserveNewest
88 |
89 |
90 |
91 |
92 | MSBuild:Compile
93 | Designer
94 | PreserveNewest
95 |
96 |
97 |
98 |
99 | PreserveNewest
100 |
101 |
102 | PreserveNewest
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/NwLookup.v18/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NwLookup.v18")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("AMCC")]
12 | [assembly: AssemblyProduct("NwLookup.v18")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("B1782B9E-6BB4-47E4-81E5-003C37B2399B")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/NwLookup.v18/Snoop/Collectors/CustomCollector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Collectors;
4 |
5 | namespace NwLookup.v18.Snoop.Collectors
6 | {
7 | public class CustomCollector : Collector
8 | {
9 | public CustomCollector()
10 | : base(new List{
11 | new DefaultStreamPass(),
12 | new ModelItemStreamPass()
13 | }) { }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/NwLookup.v18/Snoop/Collectors/ModelItemStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 | using NwLookup.Snoop.Collectors;
5 |
6 | using Autodesk.Navisworks.Api;
7 |
8 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
9 | using ComBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge;
10 |
11 | namespace NwLookup.v18.Snoop.Collectors
12 | {
13 | public class ModelItemStreamPass : StreamPassBase
14 | {
15 | public override bool CanRun(object obj)
16 | => obj is ModelItem;
17 |
18 | public override void Stream(IList datas, object obj)
19 | {
20 | ComApi.InwOaPath path = ComBridge.ToInwOaPath((ModelItem)obj);
21 | StreamInternal(datas, path);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/NwLookup.v18/en-US/NwLookupDefinitions.txt:
--------------------------------------------------------------------------------
1 | # Local names for ribbon tab, panel, and controls
2 | $utf8
3 |
4 | ID_NWLOOKUP_TAB.DisplayName=NwLookup
5 |
6 | NWLOOKUP_SNOOP_COMMAND.DisplayName=Snoop
7 |
--------------------------------------------------------------------------------
/NwLookup.v18/en-US/NwLookupLayout.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/NwLookup.v18/lib/Autodesk.Navisworks.Api.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v18/lib/Autodesk.Navisworks.Api.dll
--------------------------------------------------------------------------------
/NwLookup.v18/lib/Autodesk.Navisworks.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v18/lib/Autodesk.Navisworks.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v18/lib/Autodesk.Navisworks.Interop.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v18/lib/Autodesk.Navisworks.Interop.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v18/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/NwLookup.v18/resources/mg_16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v18/resources/mg_16x16.ico
--------------------------------------------------------------------------------
/NwLookup.v18/resources/mg_32x32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v18/resources/mg_32x32.ico
--------------------------------------------------------------------------------
/NwLookup.v19/Application.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Autodesk.Navisworks.Api;
4 | using Autodesk.Navisworks.Api.Plugins;
5 |
6 | using NwLookup.Snoop.Datas;
7 | using NwLookup.v19.Snoop.Collectors;
8 |
9 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
10 |
11 | namespace NwLookup.v19
12 | {
13 | [Plugin("NwLookup.v19.Application", "AMCC", DisplayName = "Snoop")]
14 | [Strings("NwLookupDefinitions.txt")]
15 | [RibbonLayout("NwLookupLayout.xaml")]
16 | [RibbonTab("ID_NWLOOKUP_TAB")]
17 | [Command("NWLOOKUP_SNOOP_COMMAND",
18 | Icon = "resources\\mg_16x16.ico",
19 | LargeIcon = "resources\\mg_32x32.ico",
20 | CallCanExecute = CallCanExecute.Always,
21 | CanToggle = true,
22 | LoadForCanExecute = true)]
23 | public class Application : CommandHandlerPlugin
24 | {
25 | public override int ExecuteCommand(string name, params string[] parameters)
26 | {
27 | switch (name)
28 | {
29 | case "NWLOOKUP_SNOOP_COMMAND":
30 | NwLookupCommand();
31 | break;
32 |
33 | default:
34 | break;
35 | }
36 |
37 | return 0;
38 | }
39 |
40 | public override CommandState CanExecuteCommand(string name)
41 | {
42 | switch (name)
43 | {
44 | case "NWLOOKUP_SNOOP_COMMAND":
45 | return new CommandState(true);
46 |
47 | default:
48 | throw new NotImplementedException(
49 | string.Format("Command with name {0} is not implemented", name)
50 | );
51 | }
52 | }
53 |
54 | private void NwLookupCommand()
55 | {
56 | // Force loading of the Interop.ComApi assembly so that it will be included when
57 | // the 'Types' call is made in reflection utils
58 | GC.KeepAlive(typeof(ComApi.InwBase));
59 | Document document = Autodesk.Navisworks.Api.Application.ActiveDocument;
60 | Data data;
61 | if (document.CurrentSelection.SelectedItems.IsEmpty)
62 | data = DataFactory.Create(document);
63 | else
64 | data = DataFactory.Create(document.CurrentSelection.SelectedItems);
65 | data.Snoop(new CustomCollector());
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/NwLookup.v19/NwLookup.v19.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {1EB9F9F4-C4FE-455F-BA41-950901E38D08}
6 | Library
7 | Properties
8 | NwLookup.v19
9 | NwLookup.v19
10 | v4.6
11 | 512
12 | true
13 | 2019
14 |
15 |
16 |
17 | true
18 | bin\x64\Debug\
19 | DEBUG;TRACE
20 | full
21 | x64
22 | prompt
23 | MinimumRecommendedRules.ruleset
24 | 7.3
25 |
26 |
27 | bin\x64\Release\
28 | TRACE
29 | true
30 | pdbonly
31 | x64
32 | prompt
33 | MinimumRecommendedRules.ruleset
34 | 7.3
35 |
36 |
37 |
38 | lib\Autodesk.Navisworks.Api.dll
39 | False
40 |
41 |
42 | lib\Autodesk.Navisworks.ComApi.dll
43 | False
44 |
45 |
46 | lib\Autodesk.Navisworks.Interop.ComApi.dll
47 | True
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | ..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | {1d20bc34-0d74-48d4-8f93-ccf080f50e17}
76 | NwLookup
77 |
78 |
79 |
80 |
81 | PreserveNewest
82 |
83 |
84 |
85 |
86 | MSBuild:Compile
87 | Designer
88 | PreserveNewest
89 |
90 |
91 |
92 |
93 | PreserveNewest
94 |
95 |
96 | PreserveNewest
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/NwLookup.v19/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NwLookup.v19")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("AMCC")]
12 | [assembly: AssemblyProduct("NwLookup.v19")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("7173bb97-d5fb-43e8-b347-6d9c5f204877")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2019.0.0.0")]
36 | [assembly: AssemblyFileVersion("2019.0.0.0")]
--------------------------------------------------------------------------------
/NwLookup.v19/Snoop/Collectors/CustomCollector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Collectors;
4 |
5 | namespace NwLookup.v19.Snoop.Collectors
6 | {
7 | public class CustomCollector : Collector
8 | {
9 | public CustomCollector()
10 | : base(new List{
11 | new DefaultStreamPass(),
12 | new ModelItemStreamPass()
13 | })
14 | { }
15 | }
16 | }
--------------------------------------------------------------------------------
/NwLookup.v19/Snoop/Collectors/ModelItemStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 | using NwLookup.Snoop.Collectors;
5 |
6 | using Autodesk.Navisworks.Api;
7 |
8 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
9 | using ComBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge;
10 |
11 | namespace NwLookup.v19.Snoop.Collectors
12 | {
13 | public class ModelItemStreamPass : StreamPassBase
14 | {
15 | public override bool CanRun(object obj)
16 | => obj is ModelItem;
17 |
18 | public override void Stream(IList datas, object obj)
19 | {
20 | ComApi.InwOaPath path = ComBridge.ToInwOaPath((ModelItem)obj);
21 | StreamInternal(datas, path);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/NwLookup.v19/en-US/NwLookupDefinitions.txt:
--------------------------------------------------------------------------------
1 | # Local names for ribbon tab, panel, and controls
2 | $utf8
3 |
4 | ID_NWLOOKUP_TAB.DisplayName=NwLookup
5 |
6 | NWLOOKUP_SNOOP_COMMAND.DisplayName=Snoop
7 |
--------------------------------------------------------------------------------
/NwLookup.v19/en-US/NwLookupLayout.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/NwLookup.v19/lib/Autodesk.Navisworks.Api.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v19/lib/Autodesk.Navisworks.Api.dll
--------------------------------------------------------------------------------
/NwLookup.v19/lib/Autodesk.Navisworks.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v19/lib/Autodesk.Navisworks.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v19/lib/Autodesk.Navisworks.Interop.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v19/lib/Autodesk.Navisworks.Interop.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v19/resources/mg_16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v19/resources/mg_16x16.ico
--------------------------------------------------------------------------------
/NwLookup.v19/resources/mg_32x32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v19/resources/mg_32x32.ico
--------------------------------------------------------------------------------
/NwLookup.v20/Application.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Autodesk.Navisworks.Api;
4 | using Autodesk.Navisworks.Api.Plugins;
5 |
6 | using NwLookup.Snoop.Datas;
7 | using NwLookup.v20.Snoop.Collectors;
8 |
9 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
10 |
11 | namespace NwLookup.v20
12 | {
13 | [Plugin("NwLookup.v20.Application", "AMCC", DisplayName = "Snoop")]
14 | [Strings("NwLookupDefinitions.txt")]
15 | [RibbonLayout("NwLookupLayout.xaml")]
16 | [RibbonTab("ID_NWLOOKUP_TAB")]
17 | [Command("NWLOOKUP_SNOOP_COMMAND",
18 | Icon = "resources\\mg_16x16.ico",
19 | LargeIcon = "resources\\mg_32x32.ico",
20 | CallCanExecute = CallCanExecute.Always,
21 | CanToggle = true,
22 | LoadForCanExecute = true)]
23 | public class Application : CommandHandlerPlugin
24 | {
25 | public override int ExecuteCommand(string name, params string[] parameters)
26 | {
27 | switch (name)
28 | {
29 | case "NWLOOKUP_SNOOP_COMMAND":
30 | NwLookupCommand();
31 | break;
32 |
33 | default:
34 | break;
35 | }
36 |
37 | return 0;
38 | }
39 |
40 | public override CommandState CanExecuteCommand(string name)
41 | {
42 | switch (name)
43 | {
44 | case "NWLOOKUP_SNOOP_COMMAND":
45 | return new CommandState(true);
46 |
47 | default:
48 | throw new NotImplementedException(
49 | string.Format("Command with name {0} is not implemented", name)
50 | );
51 | }
52 | }
53 |
54 | private void NwLookupCommand()
55 | {
56 | // Force loading of the Interop.ComApi assembly so that it will be included when
57 | // the 'Types' call is made in reflection utils
58 | GC.KeepAlive(typeof(ComApi.InwBase));
59 | Document document = Autodesk.Navisworks.Api.Application.ActiveDocument;
60 | Data data;
61 | if (document.CurrentSelection.SelectedItems.IsEmpty)
62 | data = DataFactory.Create(document);
63 | else
64 | data = DataFactory.Create(document.CurrentSelection.SelectedItems);
65 | data.Snoop(new CustomCollector());
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/NwLookup.v20/NwLookup.v20.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {D3DB9547-E3D2-443F-84F9-798E3C92FC7F}
6 | Library
7 | Properties
8 | NwLookup.v20
9 | NwLookup.v20
10 | v4.7
11 | 512
12 | true
13 | 2020
14 |
15 |
16 |
17 | true
18 | bin\x64\Debug\
19 | DEBUG;TRACE
20 | full
21 | x64
22 | prompt
23 | MinimumRecommendedRules.ruleset
24 | 7.3
25 |
26 |
27 | bin\x64\Release\
28 | TRACE
29 | true
30 | pdbonly
31 | x64
32 | prompt
33 | MinimumRecommendedRules.ruleset
34 | 7.3
35 |
36 |
37 |
38 | lib\Autodesk.Navisworks.Api.dll
39 | False
40 |
41 |
42 | lib\Autodesk.Navisworks.ComApi.dll
43 | False
44 |
45 |
46 | lib\Autodesk.Navisworks.Interop.ComApi.dll
47 | True
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | ..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | {578afb41-2213-4b76-bd63-7ccfae1e0b06}
76 | NwLookup
77 |
78 |
79 |
80 |
81 | PreserveNewest
82 |
83 |
84 |
85 |
86 | MSBuild:Compile
87 | Designer
88 | PreserveNewest
89 |
90 |
91 |
92 |
93 | PreserveNewest
94 |
95 |
96 | PreserveNewest
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/NwLookup.v20/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NwLookup.v20")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("AMCC")]
12 | [assembly: AssemblyProduct("NwLookup.v20")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b71f6701-2f78-4864-904c-ca81db613287")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2020.0.0.0")]
36 | [assembly: AssemblyFileVersion("2020.0.0.0")]
--------------------------------------------------------------------------------
/NwLookup.v20/Snoop/Collectors/CustomCollector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Collectors;
4 |
5 | namespace NwLookup.v20.Snoop.Collectors
6 | {
7 | public class CustomCollector : Collector
8 | {
9 | public CustomCollector()
10 | : base(new List{
11 | new DefaultStreamPass(),
12 | new ModelItemStreamPass()
13 | })
14 | { }
15 | }
16 | }
--------------------------------------------------------------------------------
/NwLookup.v20/Snoop/Collectors/ModelItemStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 | using NwLookup.Snoop.Collectors;
5 |
6 | using Autodesk.Navisworks.Api;
7 |
8 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
9 | using ComBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge;
10 |
11 | namespace NwLookup.v20.Snoop.Collectors
12 | {
13 | public class ModelItemStreamPass : StreamPassBase
14 | {
15 | public override bool CanRun(object obj)
16 | => obj is ModelItem;
17 |
18 | public override void Stream(IList datas, object obj)
19 | {
20 | ComApi.InwOaPath path = ComBridge.ToInwOaPath((ModelItem)obj);
21 | StreamInternal(datas, path);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/NwLookup.v20/en-US/NwLookupDefinitions.txt:
--------------------------------------------------------------------------------
1 | # Local names for ribbon tab, panel, and controls
2 | $utf8
3 |
4 | ID_NWLOOKUP_TAB.DisplayName=NwLookup
5 |
6 | NWLOOKUP_SNOOP_COMMAND.DisplayName=Snoop
7 |
--------------------------------------------------------------------------------
/NwLookup.v20/en-US/NwLookupLayout.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/NwLookup.v20/lib/Autodesk.Navisworks.Api.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v20/lib/Autodesk.Navisworks.Api.dll
--------------------------------------------------------------------------------
/NwLookup.v20/lib/Autodesk.Navisworks.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v20/lib/Autodesk.Navisworks.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v20/lib/Autodesk.Navisworks.Interop.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v20/lib/Autodesk.Navisworks.Interop.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v20/resources/mg_16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v20/resources/mg_16x16.ico
--------------------------------------------------------------------------------
/NwLookup.v20/resources/mg_32x32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v20/resources/mg_32x32.ico
--------------------------------------------------------------------------------
/NwLookup.v21/Application.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Autodesk.Navisworks.Api;
4 | using Autodesk.Navisworks.Api.Plugins;
5 |
6 | using NwLookup.Snoop.Datas;
7 | using NwLookup.v21.Snoop.Collectors;
8 |
9 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
10 |
11 | namespace NwLookup.v21
12 | {
13 | [Plugin("NwLookup.v21.Application", "AMCC", DisplayName = "Snoop")]
14 | [Strings("NwLookupDefinitions.txt")]
15 | [RibbonLayout("NwLookupLayout.xaml")]
16 | [RibbonTab("ID_NWLOOKUP_TAB")]
17 | [Command("NWLOOKUP_SNOOP_COMMAND",
18 | Icon = "resources\\mg_16x16.ico",
19 | LargeIcon = "resources\\mg_32x32.ico",
20 | CallCanExecute = CallCanExecute.Always,
21 | CanToggle = true,
22 | LoadForCanExecute = true)]
23 | public class Application : CommandHandlerPlugin
24 | {
25 | public override int ExecuteCommand(string name, params string[] parameters)
26 | {
27 | switch (name)
28 | {
29 | case "NWLOOKUP_SNOOP_COMMAND":
30 | NwLookupCommand();
31 | break;
32 | default:
33 | break;
34 | }
35 |
36 | return 0;
37 | }
38 |
39 | public override CommandState CanExecuteCommand(string name)
40 | {
41 | switch (name)
42 | {
43 | case "NWLOOKUP_SNOOP_COMMAND":
44 | return new CommandState(true);
45 | default:
46 | throw new NotImplementedException(
47 | string.Format("Command with name {0} is not implemented", name)
48 | );
49 | }
50 | }
51 |
52 | private void NwLookupCommand()
53 | {
54 | // Force loading of the Interop.ComApi assembly so that it will be included when
55 | // the 'Types' call is made in reflection utils
56 | GC.KeepAlive(typeof(ComApi.InwBase));
57 | Document document = Autodesk.Navisworks.Api.Application.ActiveDocument;
58 | Data data;
59 | if (document.CurrentSelection.SelectedItems.IsEmpty)
60 | data = DataFactory.Create(document);
61 | else
62 | data = DataFactory.Create(document.CurrentSelection.SelectedItems);
63 | data.Snoop(new CustomCollector());
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/NwLookup.v21/NwLookup.v21.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {944F3E88-538E-4797-B8D5-42204F60042A}
6 | Library
7 | Properties
8 | NwLookup.v21
9 | NwLookup.v21
10 | v4.8
11 | 512
12 | true
13 | 2021
14 |
15 |
16 | true
17 | bin\x64\Debug\
18 | DEBUG;TRACE
19 | full
20 | x64
21 | prompt
22 | MinimumRecommendedRules.ruleset
23 | 7.3
24 |
25 |
26 | bin\x64\Release\
27 | TRACE
28 | true
29 | pdbonly
30 | x64
31 | prompt
32 | MinimumRecommendedRules.ruleset
33 | 7.3
34 |
35 |
36 |
37 | lib\Autodesk.Navisworks.Api.dll
38 | False
39 |
40 |
41 | lib\Autodesk.Navisworks.ComApi.dll
42 | False
43 | False
44 |
45 |
46 | lib\Autodesk.Navisworks.Interop.ComApi.dll
47 | False
48 | False
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | ..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | {875544e5-cd02-4e38-8e32-3016edf47027}
77 | NwLookup
78 |
79 |
80 |
81 |
82 | PreserveNewest
83 |
84 |
85 |
86 |
87 | MSBuild:Compile
88 | Designer
89 | PreserveNewest
90 |
91 |
92 |
93 |
94 | PreserveNewest
95 |
96 |
97 | PreserveNewest
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/NwLookup.v21/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NwLookup.v21")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("AMCC")]
12 | [assembly: AssemblyProduct("NwLookup.v21")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("05D23269-0506-406C-A534-42BC67FDF148")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2021.0.0.0")]
36 | [assembly: AssemblyFileVersion("2021.0.0.0")]
37 |
--------------------------------------------------------------------------------
/NwLookup.v21/Snoop/Collectors/CustomCollector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Collectors;
4 |
5 | namespace NwLookup.v21.Snoop.Collectors
6 | {
7 | public class CustomCollector : Collector
8 | {
9 | public CustomCollector()
10 | : base(new List{
11 | new DefaultStreamPass(),
12 | new ModelItemStreamPass()
13 | }) { }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/NwLookup.v21/Snoop/Collectors/ModelItemStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 | using NwLookup.Snoop.Collectors;
5 |
6 | using Autodesk.Navisworks.Api;
7 |
8 | using ComApi = Autodesk.Navisworks.Api.Interop.ComApi;
9 | using ComBridge = Autodesk.Navisworks.Api.ComApi.ComApiBridge;
10 |
11 | namespace NwLookup.v21.Snoop.Collectors
12 | {
13 | public class ModelItemStreamPass : StreamPassBase
14 | {
15 | public override bool CanRun(object obj)
16 | => obj is ModelItem;
17 |
18 | public override void Stream(IList datas, object obj)
19 | {
20 | ComApi.InwOaPath path = ComBridge.ToInwOaPath((ModelItem)obj);
21 | StreamInternal(datas, path);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/NwLookup.v21/en-US/NwLookupDefinitions.txt:
--------------------------------------------------------------------------------
1 | # Local names for ribbon tab, panel, and controls
2 | $utf8
3 |
4 | ID_NWLOOKUP_TAB.DisplayName=NwLookup
5 |
6 | NWLOOKUP_SNOOP_COMMAND.DisplayName=Snoop
7 |
--------------------------------------------------------------------------------
/NwLookup.v21/en-US/NwLookupLayout.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/NwLookup.v21/lib/Autodesk.Navisworks.Api.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v21/lib/Autodesk.Navisworks.Api.dll
--------------------------------------------------------------------------------
/NwLookup.v21/lib/Autodesk.Navisworks.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v21/lib/Autodesk.Navisworks.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v21/lib/Autodesk.Navisworks.Interop.ComApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v21/lib/Autodesk.Navisworks.Interop.ComApi.dll
--------------------------------------------------------------------------------
/NwLookup.v21/resources/mg_16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v21/resources/mg_16x16.ico
--------------------------------------------------------------------------------
/NwLookup.v21/resources/mg_32x32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awmcc90/NwLookup/680444523de9964dc8534e39f0f8d05b58b7ccd2/NwLookup.v21/resources/mg_32x32.ico
--------------------------------------------------------------------------------
/NwLookup/NwLookup.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {875544E5-CD02-4E38-8E32-3016EDF47027}
8 | library
9 | NwLookup
10 | NwLookup
11 | v4.5.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 |
17 |
18 |
19 | true
20 | bin\x64\Debug\
21 | DEBUG;TRACE
22 | full
23 | x64
24 | 7.3
25 | prompt
26 | MinimumRecommendedRules.ruleset
27 |
28 |
29 | bin\x64\Release\
30 | TRACE
31 | true
32 | pdbonly
33 | x64
34 | prompt
35 | MinimumRecommendedRules.ruleset
36 |
37 |
38 |
39 |
40 |
41 |
42 | False
43 | ..\packages\System.ValueTuple.4.5.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | 4.0
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | SnoopWindow.xaml
81 |
82 |
83 |
84 | Code
85 |
86 |
87 | True
88 | True
89 | Resources.resx
90 |
91 |
92 | True
93 | Settings.settings
94 | True
95 |
96 |
97 |
98 | TypesWindow.xaml
99 |
100 |
101 | ResXFileCodeGenerator
102 | Resources.Designer.cs
103 |
104 |
105 | SettingsSingleFileGenerator
106 | Settings.Designer.cs
107 |
108 |
109 |
110 |
111 | Designer
112 | MSBuild:Compile
113 |
114 |
115 | Designer
116 | MSBuild:Compile
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/NwLookup/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("NwLookup")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("NwLookup")]
15 | [assembly: AssemblyCopyright("Copyright © 2019")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly:ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/NwLookup/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace NwLookup.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NwLookup.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/NwLookup/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/NwLookup/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace NwLookup.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/NwLookup/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/Collector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using NwLookup.Snoop.Datas;
5 |
6 | namespace NwLookup.Snoop.Collectors
7 | {
8 | public class Collector : ICollector
9 | {
10 | private IList Passes { get; }
11 |
12 | public Collector(IList passes)
13 | => Passes = passes;
14 |
15 | public Collector()
16 | : this(new List()) { }
17 |
18 | public void AddPass(IStreamPass pass)
19 | => Passes.Add(pass);
20 |
21 | public void Stream(IList datas, object obj)
22 | {
23 | foreach (IStreamPass pass in Passes)
24 | if (pass.CanRun(obj))
25 | pass.Stream(datas, obj);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/DefaultStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 |
5 | namespace NwLookup.Snoop.Collectors
6 | {
7 | public class DefaultStreamPass : StreamPassBase
8 | {
9 | public override bool CanRun(object obj)
10 | => true;
11 |
12 | public override void Stream(IList datas, object obj)
13 | => StreamInternal(datas, obj);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/ICollector.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using NwLookup.Snoop.Datas;
4 |
5 | namespace NwLookup.Snoop.Collectors
6 | {
7 | public interface ICollector
8 | {
9 | void Stream(IList datas, object obj);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/IMemberStream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace NwLookup.Snoop.Collectors
5 | {
6 | public interface IMemberStream
7 | {
8 | void Stream(IList types);
9 | void Stream(Type type);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/IStreamPass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using NwLookup.Snoop.Datas;
5 |
6 | namespace NwLookup.Snoop.Collectors
7 | {
8 | public interface IStreamPass
9 | {
10 | bool CanRun(object obj);
11 | void Stream(IList datas, object obj);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/MemberStream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using NwLookup.Snoop.Datas;
5 |
6 | namespace NwLookup.Snoop.Collectors
7 | {
8 | public abstract class MemberStream : IMemberStream
9 | {
10 | protected IList Datas { get; }
11 | protected object Object { get; }
12 |
13 | public MemberStream(IList datas, object obj)
14 | => (Datas, Object) = (datas, obj);
15 |
16 | public void Stream(IList types)
17 | {
18 | foreach (Type type in types)
19 | Stream(type);
20 | }
21 |
22 | public abstract void Stream(Type type);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/MethodStream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Collections.Generic;
4 | using System.Runtime.ExceptionServices;
5 |
6 | using NwLookup.Snoop.Datas;
7 |
8 | namespace NwLookup.Snoop.Collectors
9 | {
10 | public class MethodStream : MemberStream
11 | {
12 | public MethodStream(IList datas, object obj)
13 | : base(datas, obj) { }
14 |
15 | [HandleProcessCorruptedStateExceptions]
16 | public override void Stream(Type type)
17 | {
18 | var infos = ReflectionUtils.GetMethodInfo(type);
19 | foreach (MethodInfo info in infos)
20 | {
21 | try
22 | {
23 | //object value = info.Invoke(Object, null);
24 | //Datas.Add(DataFactory.Create(info, info.ReturnType, value));
25 | Datas.Add(DataFactory.Create(info, Object));
26 | }
27 | catch (Exception)
28 | { }
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/PropertyStream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Collections.Generic;
4 | using System.Runtime.ExceptionServices;
5 |
6 | using NwLookup.Snoop.Datas;
7 |
8 | namespace NwLookup.Snoop.Collectors
9 | {
10 | public class PropertyStream : MemberStream
11 | {
12 | public PropertyStream(IList datas, object obj)
13 | : base(datas, obj) { }
14 |
15 | [HandleProcessCorruptedStateExceptions]
16 | public override void Stream(Type type)
17 | {
18 | var infos = ReflectionUtils.GetPropertyInfo(type);
19 | foreach (PropertyInfo info in infos)
20 | {
21 | try
22 | {
23 | object value = info.GetValue(Object);
24 | Datas.Add(DataFactory.Create(info, info.PropertyType, value));
25 | }
26 | catch (Exception)
27 | { }
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/ReflectionUtils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Collections.Generic;
6 | using System.Runtime.InteropServices;
7 |
8 | namespace NwLookup.Snoop.Collectors
9 | {
10 | public static class ReflectionUtils
11 | {
12 | private static Type[] _types = null;
13 | public static Type[] Types
14 | {
15 | get
16 | {
17 | if (_types == null)
18 | {
19 | var baseDirectory = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
20 | _types = AppDomain.CurrentDomain.GetAssemblies()
21 | .Where(x => !x.IsDynamic && !string.IsNullOrWhiteSpace(x.Location))
22 | .Where(x => Path.GetDirectoryName(x.Location) == baseDirectory)
23 | .Where(x => x.GetName().Name.ToLower().Contains("navisworks"))
24 | .SelectMany(x => x.GetTypes())
25 | .ToArray();
26 | }
27 | return _types;
28 | }
29 | }
30 |
31 | public static bool IsValidType(Type type, Type objType)
32 | => objType.IsSubclassOf(type) || objType == type || type.IsAssignableFrom(objType);
33 |
34 | public static IList GetTypes(object obj)
35 | {
36 | if (Marshal.IsComObject(obj))
37 | {
38 | string comObjectType = Microsoft.VisualBasic.Information.TypeName(obj);
39 | return Types.Where(x => x.Name == comObjectType).ToArray();
40 | }
41 | else
42 | return Types.Where(x => IsValidType(x, obj.GetType())).ToArray();
43 | }
44 |
45 | public static bool IsPrimitive(Type type)
46 | => type.IsPrimitive || type.IsValueType || type == typeof(string);
47 |
48 | private static BindingFlags ALLOWED_FLAGS
49 | => BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly;
50 |
51 | public static PropertyInfo[] GetPropertyInfo(Type type)
52 | => type
53 | .GetProperties(ALLOWED_FLAGS)
54 | .Where(x => x.GetMethod != null)
55 | .OrderBy(x => x.Name)
56 | .ToArray();
57 |
58 | private static bool IsValidMethod(MethodInfo info)
59 | => !(info.IsSpecialName || info.DeclaringType == null || info.GetParameters().Any() || info.ReturnType == typeof(void));
60 |
61 | public static MethodInfo[] GetMethodInfo(Type type)
62 | => type
63 | .GetMethods(ALLOWED_FLAGS)
64 | .Where(x => IsValidMethod(x))
65 | .OrderBy(x => x.Name)
66 | .ToArray();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Collectors/StreamPassBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using NwLookup.Snoop.Datas;
5 |
6 | namespace NwLookup.Snoop.Collectors
7 | {
8 | public abstract class StreamPassBase : IStreamPass
9 | {
10 | public abstract bool CanRun(object obj);
11 |
12 | public abstract void Stream(IList datas, object obj);
13 |
14 | protected void StreamInternal(IList datas, object obj)
15 | {
16 | IList types = ReflectionUtils.GetTypes(obj);
17 |
18 | if (types.Count == 0)
19 | return;
20 |
21 | IMemberStream[] streams = new IMemberStream[]
22 | {
23 | new PropertyStream(datas, obj),
24 | new MethodStream(datas, obj)
25 | };
26 | foreach (IMemberStream stream in streams)
27 | stream.Stream(types);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Datas/Data.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using NwLookup.Snoop.Collectors;
4 | using NwLookup.Snoop.Views;
5 |
6 | namespace NwLookup.Snoop.Datas
7 | {
8 | public abstract class Data
9 | {
10 | public string Label { get; }
11 |
12 | public object Value { get; }
13 |
14 | public Data(string label, object value)
15 | => (Label, Value) = (label, value);
16 |
17 | public virtual Type Type
18 | => Value?.GetType();
19 |
20 | public virtual string ValueString
21 | => Value == null ? "null" : Value.ToString();
22 |
23 | public virtual bool CanSnoop
24 | => Value != null;
25 |
26 | public override string ToString()
27 | => string.Format("{0}: {1}", Label, ValueString);
28 |
29 | public virtual void Snoop(ICollector collector)
30 | {
31 | if (CanSnoop)
32 | {
33 | SnoopWindow window = new SnoopWindow(collector, this);
34 | window.ShowDialog();
35 | }
36 | }
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/NwLookup/Snoop/Datas/DataArray.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 |
5 | namespace NwLookup.Snoop.Datas
6 | {
7 | public class DataArray : Data
8 | {
9 | public List