|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577) A3 G) i# J$ T' ^
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
1 f. R3 U4 ^) A
, Z' R; k1 H: A3 G1 WDefined in: uf_cfi.h R5 u* h% J5 r. b& r2 b
: T4 ?* x% U+ D' C' |3 [' Q3 g3 X
7 p1 H6 v% x& k; _Overview5 X% T! M5 X2 t& g# L' |
4 j5 C1 C' D6 V/ oThe name returned is a unique name for a temporary file. The resultant T0 e, G. {8 j/ j2 A5 \" D9 X
filename is unique from other processes at the time. From a single
) ]! K5 J, l! b8 o6 Dprocess, filenames will begin duplicating after the first 1,679,615 calls
3 p& `/ w8 k: V0 {: }, yto uc4577. Temporary files should be deleted when no longer needed by an
5 o) W1 C7 Y" n$ p' kapplication. If the files are not deleted, there is a chance that the same
! R, l) l$ Q$ Jname may come up again if the same user happens to get the same process id
/ B8 g7 h) l% _. J2 h5 }$ G$ ion a later date. 3 q+ L1 V/ T% F2 e
+ @ f2 {- c6 gThe maximum number of characters which will be returned is 12. 5 L$ P* L' q2 h" w6 r
) T% `7 X" ?* h; {+ k) b
P z3 N7 ~3 h9 U* PEnvironment
/ d/ l, T( j' r+ C5 g0 n( s- j- A5 i& i
Internal and External
8 f" h8 B: H9 \- x& x0 j
7 X& G' n' T8 F# f) z! `; k+ |6 D3 a5 S/ m
Required License(s)4 t3 e9 m4 A( }- Z9 j
" r( d2 r+ n& q$ B% u( F3 V$ a
gateway* E' e+ y% r6 F/ ?' H5 k" @
' v$ J6 ^! S% N! f/ ^7 }, F& M
9 c8 B% a2 I5 [7 o8 F
int uc45776 l9 K3 y' n$ Q
(5 A" H$ z" K& a0 O. J" B/ n
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
) D; q3 A" h; n1 C4 A. \) {$ A$ Y% ~6 h0 l/ ~5 v* F
)$ K7 t! ]. b0 F B1 b! {2 _
2 n; S0 s! M4 y) ^| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|