|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 打印所有的GDT 信息
6 P( t- U0 A7 M' a6 }$ e# Y' q* }) d2 n2 p3 g
+ a7 Y' ?, v* b! y: m8 r% G6 \[mw_shl_code=cpp,true]Option Strict Off
0 X5 z0 u+ {6 x B: N& SImports System
( g* @- k/ Y X9 P7 F0 R; qImports NXOpen" O, t- y5 S( X, ?
Imports NXOpen.Annotations. H2 K% H0 v0 J d+ Y6 Y
. o7 G1 s& b/ ?2 c. ~Module report_all_gdts
4 D4 Z* Q5 T: Z Sub Main()* n7 t4 [& J+ M
7 f3 y: q) X7 s% K2 h( ]# i K Dim theSession As Session = Session.GetSession()/ i }$ @+ }9 Y% @8 V( \- a
Dim lw As ListingWindow = theSession.ListingWindow
" N; c8 S. o+ K. l3 G# X lw.Open()
2 Z( g7 X y& }# r' M* O5 U5 U' q
" f; E# B2 M* b1 ~7 I Dim displayPart As Part = theSession.Parts.Display. p7 |6 ?* a l6 f6 I! {' W: l
* r. F. ]9 Q% b4 M5 o, o8 E( {
For Each gdt1 As Gdt In displayPart.Gdts
/ f* y/ p3 \/ A2 M lw.WriteLine(gdt1.ToString)
5 v' [" G3 ]# ?. P Next
8 F5 F! g. c) j
( o+ P" g1 c( q% a* z For Each fcf1 As Fcf In displayPart.Annotations.Fcfs
3 K v2 E( a+ M8 u; Q' ]9 D2 R lw.WriteLine(fcf1.ToString)8 s; Z+ V2 G1 u5 @6 o/ h
Next9 M6 P3 ?9 S4 u: o! c9 ^0 Z. _
0 j4 P7 M7 d6 [; H
For Each pmi1 As Pmi In displayPart.PmiManager.Pmis
! _7 b8 c; d4 o7 [, d lw.WriteLine(pmi1.ToString)1 i2 F* ^. \9 J% I! u
Next
# c& A5 S: U% g p, D/ r% S8 N1 J
8 d2 _$ Y* M0 w8 s End Sub
, n6 q! A. p1 \% [End Module: s) j+ f' G- K* Q, }6 J
[/mw_shl_code]$ G$ `+ A/ j5 ?6 c8 @
|
|