|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 打印所有的GDT 信息$ Q* M/ T3 j: l4 d+ s' F
O( J6 m' w0 b I
7 @+ D5 |. L* z- [: ][mw_shl_code=cpp,true]Option Strict Off
Q8 J1 L9 L. }! n% cImports System2 z6 E* v/ f8 i) O+ D% s
Imports NXOpen3 }( X2 Y) }: W% ?# w
Imports NXOpen.Annotations
4 {6 w* s) V D4 S' D% I$ O$ N
; P7 H, D: M9 j- D1 xModule report_all_gdts
5 ~4 l& _! h# g; m+ H8 s7 P Sub Main(), |( o, O1 ]3 ?9 X& N& y! u r" r5 b
* F% r" R. L# R: L! c, V& x
Dim theSession As Session = Session.GetSession()2 U l0 H& [& l8 J5 z
Dim lw As ListingWindow = theSession.ListingWindow' d$ w% H% m; M9 D' [
lw.Open()
/ d: @0 b4 K3 ~" Z _* _* w' {+ u# {0 a+ c6 O1 D
Dim displayPart As Part = theSession.Parts.Display# x1 s0 J! Q! ]5 |9 S! i
* B4 R3 k8 |8 D0 P For Each gdt1 As Gdt In displayPart.Gdts$ ]0 P0 h& \& B) y
lw.WriteLine(gdt1.ToString)
) N6 m+ V6 y/ {( o5 c* x) @# V Next! T6 r5 m. ~7 p0 T1 L1 u
/ ^9 Q6 r/ e1 E4 l8 |( E
For Each fcf1 As Fcf In displayPart.Annotations.Fcfs( S% i& j6 ]% s& r" K
lw.WriteLine(fcf1.ToString)
) g! |5 j% H3 [ Next- E% J& X3 k" ]3 I
6 w3 M+ P/ I8 g For Each pmi1 As Pmi In displayPart.PmiManager.Pmis3 j( t" d: a4 h4 u4 y% E0 _
lw.WriteLine(pmi1.ToString)
' y4 x q" b& N% G Next! w/ J ^2 J3 u4 D5 H ]
1 n( L; E! j$ s* R8 }# m7 P' Z End Sub6 l1 ~2 V3 n6 w" w: ^
End Module
8 h$ Z" e' x. Z[/mw_shl_code]
" c6 ^' O7 J8 d! R3 L |
|