首次提交: OnebotCatalog 项目代码与文档(含 NX 按需生成服务二期、后台、一键启动)

This commit is contained in:
wangruiguo
2026-09-03 17:55:45 +08:00
commit fafa86d3a6
241 changed files with 78656 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
' 探针 5: ReferenceSet 相关类型/成员
Option Strict Off
Imports System
Imports System.IO
Imports System.Text
Imports NXOpen
Imports NXOpen.UF
Module ProbeApi5
Function FindType(n As String) As System.Type
Dim t As System.Type = GetType(Session).Assembly.GetType(n, False)
If t IsNot Nothing Then Return t
For Each a As System.Reflection.Assembly In AppDomain.CurrentDomain.GetAssemblies()
t = a.GetType(n, False)
If t IsNot Nothing Then Return t
Next
Return Nothing
End Function
Sub Main()
Dim sb As New StringBuilder()
Dim asm As System.Reflection.Assembly = GetType(Session).Assembly
sb.AppendLine("=== 含 ReferenceSet 的类型 ===")
For Each t As System.Type In asm.GetTypes()
If t.FullName.IndexOf("ReferenceSet", StringComparison.OrdinalIgnoreCase) >= 0 Then sb.AppendLine("T: " & t.FullName)
Next
sb.AppendLine("=== Part 成员 (Reference) ===")
For Each mi As System.Reflection.MemberInfo In GetType(Part).GetMembers()
If mi.Name.IndexOf("Reference", StringComparison.OrdinalIgnoreCase) >= 0 Then sb.AppendLine("P: " & mi.MemberType & " " & mi.Name)
Next
sb.AppendLine("=== BasePart 成员 (Reference) ===")
For Each mi As System.Reflection.MemberInfo In GetType(BasePart).GetMembers()
If mi.Name.IndexOf("Reference", StringComparison.OrdinalIgnoreCase) >= 0 Then sb.AppendLine("B: " & mi.MemberType & " " & mi.Name)
Next
Dim rsT As System.Type = FindType("NXOpen.ReferenceSet")
If rsT IsNot Nothing Then
sb.AppendLine("=== NXOpen.ReferenceSet 方法 ===")
For Each mi As System.Reflection.MethodInfo In rsT.GetMethods()
If mi.DeclaringType Is rsT Then sb.AppendLine("RS: " & mi.Name)
Next
End If
Dim rscT As System.Type = FindType("NXOpen.Assemblies.ReferenceSetCollection")
If rscT IsNot Nothing Then
sb.AppendLine("=== Assemblies.ReferenceSetCollection 方法 ===")
For Each mi As System.Reflection.MethodInfo In rscT.GetMethods()
If mi.DeclaringType Is rscT Then sb.AppendLine("RSC: " & mi.Name)
Next
End If
File.WriteAllText(Path.Combine(Directory.GetCurrentDirectory(), "probe5.txt"), sb.ToString(), Encoding.UTF8)
End Sub
End Module