|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
( q' G# W$ ?+ p& }4 M; {2 T非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!$ V1 Q3 J: y1 `! M
; ]" `* s; A& f% B! _$ M
Defined in: uf_cfi.h) O3 k/ g4 _, B5 T+ n
6 k& G+ K/ d" W9 k9 J( k9 j% w- g
* T' G- P& Q5 m$ d n
Overview
# w# e* R/ X% z6 ~: S
( N: p+ D4 ? o) ]% a, SThe name returned is a unique name for a temporary file. The resultant + C/ p+ h3 m5 B6 i
filename is unique from other processes at the time. From a single
4 e& e) N* u2 Z$ H0 Gprocess, filenames will begin duplicating after the first 1,679,615 calls ( R+ @0 w+ ~% S" g' S
to uc4577. Temporary files should be deleted when no longer needed by an + {' R. d' D! i$ y, X# j
application. If the files are not deleted, there is a chance that the same 1 l7 I* Q4 T7 _- B- m. _& a
name may come up again if the same user happens to get the same process id ) w* ^) U$ [% _- v( q
on a later date.
9 m- V o, V* U5 [6 x. X! z& @
The maximum number of characters which will be returned is 12.
. o. h/ x, M9 W0 \4 q. J
& O0 e2 Z6 ~" C
7 G7 u) A* [) AEnvironment
/ T/ g; q/ W' {( ^
6 w$ H& ]9 V6 y9 OInternal and External 4 q1 x% ]4 o9 }7 H( Y6 e* ?+ g, X7 y E4 G
3 X3 U% q( I1 h/ c% y* U4 N+ y3 ~
. s3 M, }' p, w; g" ^% JRequired License(s)
5 j& H/ A4 Z. K
& A2 ~4 Q. m3 e! G$ ogateway
* ^" S* l7 X! Y/ T E/ x- E# I2 y- k; Q5 p8 L. A
# h# L% S2 w9 i2 |5 l6 c3 P
int uc4577
1 Y' t6 k( }0 a(
% ~9 ?. S; N' }7 ?& W. F/ Tchar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
" Q2 ]' B' U! Y% K9 B5 v/ O7 m( ?! X. e& E
)% s: q& q9 M' ` t7 e2 [: X
3 q* B, ^! s% Q! z6 g7 n; I
char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|