|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc45776 L/ m5 V3 h; x" T3 D
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!! x/ u+ f0 n! c# \+ z) W! j
. w4 m; m; G9 P; Z# a2 v( ~
Defined in: uf_cfi.h
* o* n' R6 n k% E2 d
) c$ P% D* a6 c
3 [' J( c; k, k v! a8 |2 B. k6 ~Overview0 l' T$ H' A- E* V
$ E$ j, o/ ` D
The name returned is a unique name for a temporary file. The resultant
% @" G3 _& s: A( }* `% i) U; efilename is unique from other processes at the time. From a single : V. {& y* R$ X+ x7 L$ D$ G
process, filenames will begin duplicating after the first 1,679,615 calls * C, {8 K6 e4 P. v w8 w. w
to uc4577. Temporary files should be deleted when no longer needed by an : f9 z; ~$ o) [; ` I/ D8 A" i! N
application. If the files are not deleted, there is a chance that the same
. Z" q; y; o, q+ v+ X" R, | i: Pname may come up again if the same user happens to get the same process id ' B; V8 _: X* \1 u( S# h/ d3 }$ _
on a later date. & E' `) Z. F1 y5 U3 ] s! ~( l, b
% N* t* N- P$ ?$ Z
The maximum number of characters which will be returned is 12.
% N: C) t7 c# s, g& {# _6 u5 b7 f* q; Y+ y
8 N5 b9 y4 ~4 a0 L% q) M
Environment
( q: \1 l! ?, Z# D) F6 w
$ c1 E+ Y5 k- k$ _* j7 |: z% M" DInternal and External 6 C) U, t2 }% t1 D5 a" Z6 U3 Q5 \
1 P6 w! C/ c7 @+ V9 X
5 |' x- ^! F5 a* E& B! uRequired License(s)
( U/ O4 x4 W6 n. `0 f" n' b0 O, `* w) C3 ]; F
gateway! V+ I- ]: a4 q( a9 |* F5 P$ o' Y" _
0 {! p9 b, R1 m) r' F
# R8 u; A5 g6 _
int uc4577
2 ~, M+ L7 V5 w6 y8 c. x(; a# ? ]! W" @% W7 I1 @+ [3 J
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] 3 D' `- U: m; d- R- v/ H
- a6 s5 d3 L1 M5 t
)% I+ M% L7 k7 H, a2 k! v5 e
4 {# b4 |. |) G7 i2 o' Y| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|