大家好用NET给层随便命个名字,可是一直报错:如图,可找不出原因,那个高手请出手帮忙。我感觉函数引用没错呀
下面是代码
Imports NXOpen
Imports NXOpen.UF
Imports System.Text
Module Module1
' Explicit Activation
' This entry point is used to activate the application explicitly
Sub Main()
Dim f As New Form1
f.ShowDialog()
' TODO: Add your application code here
End Sub
Sub SXM()
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
'Dim theUI As UI = NXOpen.UI.GetUI()
Dim theUfSession As UFSession = UFSession.GetUFSession()
Dim SS As String
Dim categoy As Tag
Dim i As Integer
Dim cat As UFLayer.CategoryInfo
With cat
.name = ss
.descr = ss
For i = 1 To 255
.layer_mask(i) = False
Next
End With
theUfSession.Layer.CreateCategory(cat, categoy)
End Sub