|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
' W, e7 y# R- t非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
- f1 b% K4 ?1 n$ W$ N
2 j D$ N) S. E( ]2 K% ~Defined in: uf_cfi.h
0 y S4 w7 ]. \+ v
- L8 ~) A7 d! w$ k( c, Z* `* Z+ h0 {. A- j9 R5 U* t& ^
Overview1 U4 L2 u( h" d; l1 Q7 i
: Y+ n8 N+ ^ U4 ~
The name returned is a unique name for a temporary file. The resultant
; ~! e0 j; H# \, mfilename is unique from other processes at the time. From a single
4 n. r0 M( m2 p% cprocess, filenames will begin duplicating after the first 1,679,615 calls 4 D( B5 s, Q# g0 f
to uc4577. Temporary files should be deleted when no longer needed by an 0 X, [, i. L j# p" s$ ~ l
application. If the files are not deleted, there is a chance that the same
/ k+ z u9 D) O& m/ l1 kname may come up again if the same user happens to get the same process id
$ ^! E% R5 p7 oon a later date.
+ @6 t' ~& b7 L" ]+ ?! T y. i U L r$ T
The maximum number of characters which will be returned is 12.
3 B/ J; O# o* T% B5 P/ h; L' @" Y* c; N: o3 [! c( D
! q1 a) }9 o' X8 B* m% G
Environment* |+ i5 ~. K+ R7 a( ]; `
( Q4 {( z( R9 {* f7 y
Internal and External
) o4 U( G. X" u- v/ _, w8 _
: }, c }4 h, S/ T `0 {, d3 W- [
3 ?; G: P" d0 l2 f0 J% PRequired License(s), b( _, U; d8 W
* p: \ Y. U* q4 {
gateway$ [8 n) [' [) C0 j
, s7 e+ `* g, A- |
0 M. ^4 s/ n% {3 c% l) n
int uc4577
! A* [3 f4 ~; f2 G: l(
3 I! e6 V, S6 S2 [# I$ S0 Y8 P" Bchar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
4 l( T5 N+ `$ D9 c, Z
# X+ `' l6 ?: g& @' S)
- O; S0 y$ G' s( W# C! a4 D" _
4 Y$ ]2 [( G7 D/ C| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|