ug二次开发 vb.net nx1980

1.特征体属性

 1 Option Strict Off
 2 
 3 Imports NXOpen
 4 Imports NXOpen.UF
 5 Imports NXOpen.UF.UFAttr
 6 
 7 
 8 Module Module1
 9 
10 
11     Sub Main()
12 
13 
14         Dim theSession As Session = Session.GetSession()
15         Dim ufs As UFSession = UFSession.GetUFSession()
16         Dim Lw = theSession.ListingWindow
17         Lw.Open()
18 
19         Dim num_ As Integer = 0
20         Dim objlist As Tag() = {}
21         Dim count_ As Integer = 0
22         Dim iter_ As UFAttr.Iterator
23         Dim info_ As Info() = {}
24         Dim num2_ As Integer = 0
25 
26 
27 
28         ufs.Ui.AskGlobalSelObjectList(num_, objlist) '选中的特征体
29 
30         ufs.Attr.InitUserAttributeIterator(iter_) '估计是初始化迭代器 没它 这个GetUserAttributes出错,不知道为什么
31 
32         Dim i As Integer = 0
33         For i = 0 To num_ - 1
34             ufs.Disp.SetHighlight(objlist(i), False)
35 
36             ufs.Attr.GetUserAttributes(objlist(i), iter_, num2_, info_)
37             Lw.WriteLine(info_(0).title)
38             Lw.WriteLine(info_(0).category)
39 
40 
41         Next i
42 
43     End Sub
44 End Module

 

上一篇:实习面试四


下一篇:ElasticSearch 2 (7) - 基本概念