|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
f1 P; ~ i# k9 h1 N非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
; n' p7 E/ h0 c3 [$ g4 A) R6 T' H1 z5 `& ]; m2 P
Defined in: uf_cfi.h3 ]/ I9 c9 r2 A& S4 q9 @
9 M, ^ Z M& D$ w
; O9 F* S8 q3 }3 P* e: `Overview/ @+ A @8 E4 n3 P2 W! y
; N: I `9 H' K% v7 ~The name returned is a unique name for a temporary file. The resultant : \$ C. u7 w; V1 m+ _5 [# D& X9 E
filename is unique from other processes at the time. From a single
; T; X6 i- l4 u0 B9 r# T9 Xprocess, filenames will begin duplicating after the first 1,679,615 calls . X' _; L6 _. x! \
to uc4577. Temporary files should be deleted when no longer needed by an : e5 \% H( v7 y. W) L0 i# [8 [
application. If the files are not deleted, there is a chance that the same : ~' H* @: l& _6 s, ?- I2 g
name may come up again if the same user happens to get the same process id & ], ]% C3 Y# Z, M' `
on a later date.
6 `3 |/ d$ |6 }! G$ s
1 y. T' F- @ _$ R1 \+ U) zThe maximum number of characters which will be returned is 12.
2 r6 A2 U' l- |& n% b$ s6 v$ V4 E
& [" _/ H# r' Y! R) @8 \9 T9 Y
Environment
|. |" C# w2 m( q' `& ]$ j2 T, B
6 s( I2 I1 I8 j( e9 h* PInternal and External + M1 H6 Q2 ?% d3 c& d1 D
5 q, ~4 `, `' h) R
8 _( v# v# w. w( Q# ERequired License(s)' ?9 u6 q" N4 r
6 S. F1 U/ Z# O! U9 ?& Z* P3 ~gateway
. N6 p3 D+ J6 w1 M* M1 ~6 ^) d W* _8 t" m5 o4 ]% _) H
+ w: [# j& Y; U1 Cint uc4577
8 a& I7 l8 I v L+ x" _(& y+ V- L6 N$ {4 D
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] & i' i" I+ I1 @+ p8 G. @2 G; W
3 E- Y1 _) u3 O* d) \3 s% s8 Z' {)
' E, S9 C; U }! F
9 l9 }% u; |, \: \' X0 }| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|