|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577& T% A8 R* H" |8 _4 T1 A
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
, _ t! m$ I; }2 P' G# E/ E) V$ a8 J2 Y, a
Defined in: uf_cfi.h
) t( M" T( x( E# s - |& S! r# Q* T
8 F ?! z/ V) K) Z2 l3 _Overview
, P) l) |" l$ k- L m
3 ?5 h# l- Q1 C2 O" p* jThe name returned is a unique name for a temporary file. The resultant ( {% u8 I% ~! H2 p& u
filename is unique from other processes at the time. From a single % Q; c! f/ r& c7 Q6 B: b6 @
process, filenames will begin duplicating after the first 1,679,615 calls O; z" O: R$ b T
to uc4577. Temporary files should be deleted when no longer needed by an
( K8 i3 q' Z# K' aapplication. If the files are not deleted, there is a chance that the same
}" u( @; E6 Sname may come up again if the same user happens to get the same process id
* V0 B$ E6 F1 }$ [0 Non a later date. , }) Q7 i: V% o/ \3 r
# m9 g5 `; Y8 x! P" `& ^
The maximum number of characters which will be returned is 12.
2 I3 A7 l& R$ x& H$ O' _ v0 b0 f$ ^, C0 U# f/ b
& C5 i( |6 Y0 i5 x, X8 K/ x2 u
Environment% L; } E/ f& T
: ?8 i; X' `" b, d/ o% ~
Internal and External
5 r2 A) N3 m4 E3 H' p) ?2 S3 \
8 z/ W) V% X% E5 F) C
! T+ `$ o- a' |0 @" TRequired License(s)
/ r$ F i* _, \' K: L( G8 m& h- V' p+ I q; L' n( M( e
gateway8 g5 `( t# z y
0 u4 K- X3 I8 c! `; S4 G- Z
, ^) w7 V! ^- @/ Z' ]' [) W9 S6 {
int uc4577
- q( s2 O0 H4 `! b(
5 r" A& f: _( }5 Q1 J6 b" Echar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
, c! L( ^) x; A S7 U4 l& k$ |" d Z! h( N
)
' I( F8 \+ t* {, y. ~
' I/ w9 {' E" a; n$ C, V X0 } char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|