|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
1 @% m. _5 d' t2 w0 K v0 R非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!8 m8 h! Y+ B: r* r! v4 `* O/ w
" O% w5 o( W5 e9 Y" G& P( I. ?Defined in: uf_cfi.h2 j5 S: G0 M. W
# t: P8 O) i! G# U6 b$ _. ?) W
/ G2 R) M0 x: T
Overview+ t+ H) r) \5 l, I# Q) ]
& V1 Z0 A5 z. b1 b& J* MThe name returned is a unique name for a temporary file. The resultant " K5 l) r1 X8 {, Z; @; X4 |# E5 H
filename is unique from other processes at the time. From a single
; i+ H: v" {/ e+ q- i) I: H5 wprocess, filenames will begin duplicating after the first 1,679,615 calls 3 T9 C7 L2 Q6 |9 @5 k$ f, F9 V- R7 K
to uc4577. Temporary files should be deleted when no longer needed by an 4 i; w3 v3 G0 ?; x# a0 N# A' V
application. If the files are not deleted, there is a chance that the same
) t" s# G6 j* {" Aname may come up again if the same user happens to get the same process id
n" j2 j' r$ Z' q0 oon a later date.
$ t" d% m5 }8 |6 E K' ], A) {+ t2 x t% g5 U0 @! A0 Z0 N
The maximum number of characters which will be returned is 12. 6 {/ C$ j, M1 r1 M% z% x
/ O# J) e5 h) Q* m% D
5 C1 t, A0 A/ UEnvironment1 m5 v. Q% m" q& h9 {; k3 l9 b: W
" n l! L' F0 \ kInternal and External & e9 c( t( G j Q/ L
# M, V0 O+ v' m$ [* A9 x
% ]& V. [% M. e8 e. N
Required License(s)/ q6 d& j! U9 l+ d: o n
8 f% D; g9 A# |, X
gateway
4 U2 d$ u5 }4 o! q* S" {- Q O8 G- y8 r
5 j. K# v2 C2 I
int uc45775 n/ v# B6 F; ?! j+ c4 m
(
% w, a2 K5 ^- t8 A3 D" `char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
K" l) q/ p( g2 I/ b* D7 B6 @: P
)
% X- A# ~- q5 e5 e# o+ z7 U- v5 v! J6 w- a; @, j, E t; w
| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|