|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc45770 ]9 G0 f; I8 J* S, T
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!4 Y( s' b' q# L
2 w a* D: ^7 t/ [, o7 m& TDefined in: uf_cfi.h
! a- A& \4 i- D
. G; E6 b; j5 z1 J& b' Y+ T3 v" F- `& D8 }% M6 d2 i$ C2 C) d
Overview
# U4 O( _/ u1 Z, F- `* f* n
: n$ {% W& ~# l: G: B" DThe name returned is a unique name for a temporary file. The resultant 2 a3 U9 y7 P9 b0 W
filename is unique from other processes at the time. From a single $ S/ J/ h6 A, O2 G3 l
process, filenames will begin duplicating after the first 1,679,615 calls
# c4 ^* c e% ~4 \% q. D% gto uc4577. Temporary files should be deleted when no longer needed by an 6 Z1 p& r7 |. H, E6 _# A
application. If the files are not deleted, there is a chance that the same ( \' U$ u% ~8 {2 z1 t5 |
name may come up again if the same user happens to get the same process id 5 p' ?* L8 B# ?5 e5 P
on a later date. 5 o# W; s/ ?- m- J# p: q
' X' S8 j3 X( }
The maximum number of characters which will be returned is 12. $ T6 K3 m' a& e* O! ~ A0 M
% r% M1 C# p1 |3 B# B" y$ j( c: B+ h% Z4 R4 q) Z8 q' \
Environment
8 U4 [7 }/ L7 G6 P) i m. w+ Y0 w4 z. s
Internal and External
! d/ t( i0 L! a) F1 m
. g9 n L% J K- D* a- l e9 b* s6 A
5 s5 r( x4 S6 ~- r$ _9 N# [Required License(s)/ b& e' k! A; U5 W& _
) }# f& d" L% {
gateway% Z- P9 d2 g( N
9 [4 z! g+ r: B# v$ Q- \ E: T
D+ {" M$ F. l8 Sint uc4577
' n4 G2 C. C y# g/ b+ n$ i(% ~1 [$ ?" J' {
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] 8 K2 h) R2 D- ~0 N& o( D' u# A
+ O1 i s7 ?1 J5 H d; Y9 m" v)
3 N, g- w% A. U( A p; M5 y/ O( x3 V& V! y8 x! ~: z( E" e. U. }
char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|