|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
% [# }; V8 a0 Z. u9 |2 Y1 i5 z# y, P( q非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
/ n3 u5 j, q* @+ i
2 e' x8 c/ A% e) W' WDefined in: uf_cfi.h, X; n$ w3 p3 ?; x8 J
, R5 E; O* v2 ^, h0 d6 Y! c5 _8 Y f* b$ Z7 l
Overview
* c! S9 R% E. I5 R/ u! m/ h. b, c3 M( I/ D" W* n
The name returned is a unique name for a temporary file. The resultant
5 f' z, K5 e; u- p! L5 _ rfilename is unique from other processes at the time. From a single
( |3 E& C2 h$ ?process, filenames will begin duplicating after the first 1,679,615 calls & |* ~4 O% O# z/ B
to uc4577. Temporary files should be deleted when no longer needed by an
: h. i$ s& w: d3 J) |$ K9 i% Mapplication. If the files are not deleted, there is a chance that the same 7 K3 B% S9 f" S! H# ~& \. A. f
name may come up again if the same user happens to get the same process id 5 S+ r. q1 F6 H; {. G0 ~7 v6 q
on a later date. 0 a9 B2 Z' a7 D1 o" E. e
0 E: {! y* F7 M+ [! Y0 H
The maximum number of characters which will be returned is 12. * R9 k3 L4 M8 h; x0 D6 G
7 }: `% {0 }! Z: ~8 s
/ m4 h: I3 M! g" o; C5 Q% P5 ~Environment
# J2 ?. @ Q5 S
/ X1 s B" Z8 S, T3 X, V$ _Internal and External & b6 ]9 X# I `+ j9 Z7 ?1 n
) Y) u2 A! }: q2 \( B* i# L/ n# w# G
" t' n1 `2 i+ ?0 m5 y' Z! E
Required License(s) ]' K4 R! x* Q7 @5 m" o# V
( P( h3 X, g3 z" tgateway
4 o& f& q3 m- s. M* u; V3 g, B9 `/ U; e, X; B" u8 \
* c' ~' |3 E8 u9 m0 s( J( k, X* Pint uc4577: L3 Y. S. O2 `8 D- S
(
4 [: Z' P7 G! f" w& s6 Lchar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
" j" f9 k Q8 k, N0 K, F# a% Z/ `. Z7 T
)# u" K3 C/ F' `$ S/ b9 J* b
8 a" w5 k! H" J" |
char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|