|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577 K5 a9 W7 j" u( \$ y
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!* S* d2 u0 _1 b4 e5 n) v! l) L
; w+ t) s2 D2 l J9 b4 V
Defined in: uf_cfi.h
+ H% S/ [* Y+ o( ?) N
+ o9 ]& a3 ?! @1 x' P+ {& A
. T' m1 N) h! ]* _8 k8 oOverview
- q( d. W: e5 K: x% @1 a I. R
- z( B j. O A- I- k9 YThe name returned is a unique name for a temporary file. The resultant 9 G% z* D' w/ D: k' v
filename is unique from other processes at the time. From a single
7 p1 C2 V* w2 r3 S" yprocess, filenames will begin duplicating after the first 1,679,615 calls 4 g9 A( C7 ]8 n; O
to uc4577. Temporary files should be deleted when no longer needed by an
& n* M( p3 Q0 S6 @: ^application. If the files are not deleted, there is a chance that the same
7 z2 k; }5 a% e/ U2 xname may come up again if the same user happens to get the same process id
: e0 j3 J9 ^, H: f# U2 I( b4 L# Kon a later date. Z; _/ h7 ^9 A; n* Y" H2 T, L1 g
+ N0 A9 f' Z, M+ G vThe maximum number of characters which will be returned is 12. % x9 R+ I2 q7 V6 z$ ? V
9 t3 Y6 r4 g! l9 y! g5 h; x7 i: G$ d, J, L( ]; z
Environment
, q3 _ \8 e% _& J
# q) B) M3 v- c, d0 Z. sInternal and External
+ ^( u- c% F) V7 Y$ S/ Q
4 D. P" t6 `% h" H6 g" J" g" {: H" _; {, V' q% o& B
Required License(s)+ c' M* |1 Z) e8 Y6 |5 h
; _" p/ S# j3 a% Rgateway
( m' S7 K- M; l3 r7 {0 S
$ V/ r" g" p: l3 v" r* b; O6 ]. M& Q. m* k* z/ t
int uc4577
$ N: z% A; K5 W1 a( u: Z(
% `$ H: S: i" B7 j" j( ychar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
p5 u! n" ]$ G! _$ A% s2 X0 q8 b* |& d: ~. Y, K
)5 _9 _$ j8 K8 P; e& l6 }; ]- B
; W) x: H% U& k- \" k
| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|