|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
9 Q& S8 D; a9 d- k: r( X. K非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
8 t/ Y. J; l: x3 L1 n( I& {; {
Defined in: uf_cfi.h, F4 C$ V" i5 G0 o; i
% O7 P. `# n ]( m" v w; f6 e# h
" @6 Z- f) s4 I9 T
Overview
6 D4 B2 S$ K! A: X. O4 }# ?. ]9 h' W9 `( W1 P# F/ }2 n
The name returned is a unique name for a temporary file. The resultant 9 `5 k1 \' ]- a
filename is unique from other processes at the time. From a single
3 U2 b8 N2 n' o1 Vprocess, filenames will begin duplicating after the first 1,679,615 calls 1 X+ }: U/ u/ d% _' e& z/ ]
to uc4577. Temporary files should be deleted when no longer needed by an
( L* N+ k$ \/ I3 Aapplication. If the files are not deleted, there is a chance that the same
0 L- j& O* |9 w6 @name may come up again if the same user happens to get the same process id 1 m$ U7 z1 z+ f
on a later date.
- \- g5 @; N- G5 E v4 e8 i3 H' W* m. x0 X3 J
The maximum number of characters which will be returned is 12.
5 _% V$ D9 o) {* x
' |' C2 ~5 M! u9 O! s: |! ~' J* Z
) ]9 [; K9 o5 M: \# XEnvironment8 t; w5 G8 @" q# A/ R3 B
; A0 C3 n8 p4 F( }& x) g
Internal and External
& o4 I( x S/ `( J
7 S. }" y) a1 z1 O+ |, B7 N, ~* J3 s
Required License(s); z0 `$ Y, A3 U) ?) p7 n1 P
5 Y3 C4 n) C& q4 D" P' A9 Ugateway
. y3 k' n3 r% ?
5 n! v6 z0 u# W! k9 r( u! P: d$ k' D" V3 w4 V
int uc4577
" {- S3 a. \& {$ W: {' T- w* L' Y(
* X# w, |" f3 Y) U3 P! E) Vchar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] . g* [0 J$ ]* F7 z+ ?
- }1 g" r+ C$ h- l! C
)
2 ?0 \% s2 C7 P: x2 A4 R! [1 j/ Z8 `2 I" f
| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|