|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
9 }# v, c6 C) p& I/ M: ^9 R( ]非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!6 ]/ {) J$ f8 w0 _; |
) _4 K' S# z! {; m5 @Defined in: uf_cfi.h
$ h# ?* Q" D( C" A/ Z/ b " b& Y# F* d3 P
9 m7 ~7 Z6 s( @ E; I$ k4 KOverview
, k( z" v' R( f6 s5 W7 q
) D/ ?7 U0 k4 ]9 K$ p( lThe name returned is a unique name for a temporary file. The resultant $ g6 I% o$ q/ z9 M9 O! A3 Q7 Q
filename is unique from other processes at the time. From a single
: r2 i; o! C, S9 b" V3 b! G6 bprocess, filenames will begin duplicating after the first 1,679,615 calls
. {! I5 W2 u6 f8 p- C6 Tto uc4577. Temporary files should be deleted when no longer needed by an
6 m! w+ Q. S# D" Z, ~0 f3 capplication. If the files are not deleted, there is a chance that the same # k" ~ c; K" ~5 w' d
name may come up again if the same user happens to get the same process id * p5 A2 x: E0 a; ?' u7 C
on a later date. 6 o' `- y' P# Q% n: L& ~
* w" K& k3 c! r$ d3 d; r, h/ N
The maximum number of characters which will be returned is 12.
0 f: q2 [! C' D, X1 y7 V7 K7 b- m5 R; Z1 W) k
; S" ?( R6 y$ ~. u J, WEnvironment
9 j+ ^- i: O1 U
; ?9 B0 a i$ K$ ~: pInternal and External
/ E, n' K0 S1 | m3 K+ I( X8 F 6 P, Q7 f$ o! H8 w" e
: G2 P( h4 A$ t& _* URequired License(s)0 x6 u9 q9 Y1 V0 H3 T0 e4 r
- w0 T1 g; j. {- E' _
gateway
0 i: ?$ I) p. e/ N4 ]
5 Y+ P7 i( T( i h7 M6 M
% ^1 [% h0 j* y6 N+ L" kint uc4577
# ?5 G8 w( v0 j+ t' L u(' J$ k0 f- C3 x
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] 8 `8 R! f+ @% Y6 I5 O
1 J7 Q% d# U& U8 y
)/ |$ z, ]7 ]1 d5 ~5 x' B$ H' k
$ C' C4 O$ g" T, S: H/ w L/ a
| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|