|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
: U5 X; q) _% h$ x! l2 |( z7 t9 X" N非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!2 j& l0 \% V. N6 @ P" Q: A8 I
2 z# R2 i. Y2 P* o2 wDefined in: uf_cfi.h: s( Y) T2 J. U& g6 e
- q" Z# P% @; k1 P F6 z# G8 [/ Y: k" m/ H
Overview. |" C9 r1 ^# T" \- j* p0 L9 W. R. {
7 u4 |. r- W4 L, m: z& n
The name returned is a unique name for a temporary file. The resultant
& p+ N Y$ j" G. s5 }% hfilename is unique from other processes at the time. From a single $ b8 y2 H0 p' p3 O
process, filenames will begin duplicating after the first 1,679,615 calls
: L6 B0 g# {' A% r$ Vto uc4577. Temporary files should be deleted when no longer needed by an ; Y/ n3 K1 B" c Q6 Y
application. If the files are not deleted, there is a chance that the same " Y M9 Y, L8 h& P( h E% \
name may come up again if the same user happens to get the same process id
" D/ Q; O2 c& Gon a later date. ; e/ x( s: u. B$ N" y; n0 z L
9 D; I7 a7 ]& j) D. ]3 Y
The maximum number of characters which will be returned is 12. " w+ F8 K. O! Q: A7 Y
3 w8 U8 M7 C- m# T. e1 W- P+ ?* p: W& j: f a
Environment
5 }0 @- U. M) b7 o/ u* j1 d' k n$ |) R! |" ^7 b. W
Internal and External 7 f0 w& d5 n: t( H+ j
) A5 b% }, t1 l! U3 K$ y9 B8 ]- E1 L( ~7 B3 R* R& E
Required License(s)
c! m' X6 D1 i1 X k8 f4 C9 J
2 |0 x# T4 I. g7 O6 b. Z# @gateway
8 o9 E. I. Z, ^3 ~" J5 [ K5 b: U6 j+ \
4 c h$ \6 n+ ?* Kint uc45777 C$ {% ]6 Y! l# c
(4 a% T( E. G6 a5 g+ R6 F
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] 1 A1 d- u! U: e n* \$ B" [6 t
$ w& @$ D# G" O# z" s8 ?2 W), ^1 E, q5 a; O) D+ n, K6 y$ `
5 [: ~- V4 [! }! d7 @4 S| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|