|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577, ?) |: U8 e! d5 H
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
- \/ q0 a8 M, C1 t8 }$ }/ \+ }% B( A
Defined in: uf_cfi.h
9 `3 m% D1 ?& r6 A8 `6 }# L1 T! A * C" O1 u% S. L: b8 t6 H
. e' G8 ^0 B5 f4 j3 dOverview
1 J( L/ T$ k6 T) d3 j7 H
& R0 K( J2 _+ t& T8 v6 nThe name returned is a unique name for a temporary file. The resultant 6 [. @8 c4 y& B! @% V# k( m3 ]# H2 L
filename is unique from other processes at the time. From a single
3 g$ q" l4 U; Q9 v- Eprocess, filenames will begin duplicating after the first 1,679,615 calls
+ c* E _# j( K% Oto uc4577. Temporary files should be deleted when no longer needed by an 2 }, M1 s$ \- y/ M6 ?* r7 d
application. If the files are not deleted, there is a chance that the same
. i. }/ U% z9 ]: ?; }name may come up again if the same user happens to get the same process id
8 t# `1 \% \- K! qon a later date. ; N! R$ r$ t; O2 s
1 Q9 h* H% y. y1 }8 d7 o) RThe maximum number of characters which will be returned is 12. 1 \( c7 m1 s K7 x
& V V" W0 a+ [7 T/ Q5 f- t% V, _( u m5 x+ O
Environment
& j8 p6 f7 l `& k4 Z4 g# J
7 B8 n$ j. ~4 B; ]Internal and External
! V' M$ f" }& @' b; Y. m
! c9 R$ W' A3 Z" u. J6 H$ u" A
( q+ u4 f4 \8 u# S" H* [8 |Required License(s)
+ q) _) a0 A- v* G/ p5 B6 v) Z$ G" G4 g# Y. \) L
gateway1 @# I7 g$ b9 K6 i% h- B
0 _4 i2 Z" e- ?6 ]" s% Y# ]
% g4 T% ^$ e9 e5 y% B
int uc4577/ X3 ~' a3 f( l1 R" |! v$ t1 T G
(# `( t9 v: v6 Q0 u Z0 U
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
# B# B$ @1 l* a" O v2 S0 y7 s6 U* h. E( k$ P' z
)6 ^8 S9 z7 M2 ?2 a+ q4 N8 }
+ E; e% m7 m6 w- o2 v+ q
| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|