|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577- l7 L+ U/ t5 G1 [9 ?, {9 L) v( U5 ^
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
. T# T3 Z6 y1 D$ _2 I3 l' p8 p2 B m' y
Defined in: uf_cfi.h
' X$ N: O3 y3 l0 a- w& \) a8 C& f ) p |3 R& M; C- X5 [* @" C8 ~
1 x4 u5 g0 |7 I j: C( i
Overview
0 t: I+ \/ q( t/ V
; b: }* F# \" e* w4 R6 `The name returned is a unique name for a temporary file. The resultant
8 z7 X, i; L. ^1 y, Zfilename is unique from other processes at the time. From a single 5 h# t' R& z/ t( d4 b) d0 h% C
process, filenames will begin duplicating after the first 1,679,615 calls # G- N% o- t$ n% G* j1 m
to uc4577. Temporary files should be deleted when no longer needed by an
! ?! u/ h# b6 A0 y7 k4 c( a# }application. If the files are not deleted, there is a chance that the same ( i8 n1 ]7 ~' P8 m: Y
name may come up again if the same user happens to get the same process id
' o: r1 X, ^7 G* Mon a later date. - s; i, k9 Q' n8 S4 W1 [8 v7 X R
4 Y. f* W- n) A2 G( E0 H/ b. xThe maximum number of characters which will be returned is 12.
4 v: }) d: @/ {/ a/ |
7 L/ ~" }7 V8 y# W: G# f" ]; r$ `2 |+ \- C, l
Environment
% |5 f* Q6 E# o; F7 u! A* ^7 I9 J" x! U Q) d
Internal and External % }9 P) ^+ I& }; t9 ?# M* V5 R
# |" ]: i% }8 ]& e- U! \, e4 b1 l% ]' i. Q9 L9 \. A
Required License(s)+ K4 y! d* X+ s/ _" f& L" v" b
2 U5 X. J4 q' [$ d9 W) pgateway, P! I- v# Z8 \% j
) M" n/ p9 W, h, V
* f. W: x/ x; z Z' i/ @/ }9 @int uc4577
: a2 D5 R: s+ p5 I3 o6 b(
4 n% H2 ?6 ?! j) ychar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
0 w5 }6 e& G, s% g4 ~* h, ?* `6 E! ~! N
)
) V7 f, I3 E( m
% D' X- L( H8 h| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|