|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
- W: W# e% p6 z非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
$ X# y( Q% a' r6 f) U; C, R0 B! w7 m& I* k) b5 d
Defined in: uf_cfi.h+ I/ s$ w, z: h% d' B
5 l3 N3 D9 ^- S7 g- l) a) w5 i) S9 \& ] M0 g4 t3 T
Overview
7 ^$ K2 W1 M- ^, r" @# r
8 }5 k. |- e. f$ _The name returned is a unique name for a temporary file. The resultant # ?/ K2 g! |% f, a+ }- Y8 y1 ~- F
filename is unique from other processes at the time. From a single % w0 q6 m' g0 j/ X7 u3 K; N- N
process, filenames will begin duplicating after the first 1,679,615 calls & B! l- c! |8 }* y0 b6 K
to uc4577. Temporary files should be deleted when no longer needed by an / K, A8 M$ b! h! U
application. If the files are not deleted, there is a chance that the same
4 k5 w) g) o1 c2 M+ E$ k5 Qname may come up again if the same user happens to get the same process id 5 D t y3 x0 Z
on a later date.
4 j# m( t9 h1 P' J* V# {% {* l. H- I8 I/ w( |. Y; I
The maximum number of characters which will be returned is 12.
+ w7 e0 A: M! M0 D" h7 O2 f& C) a' D4 G# c( }
" V4 J5 v/ v, t; v
Environment) L& y: G' k3 w0 ^
* h4 i* S* k' a8 B0 hInternal and External 3 H) k, D/ _/ ]* u4 R, e& B
2 r) d- |% |( @6 {5 o
0 A# [ q- S0 n1 X+ lRequired License(s)3 [# N$ a' h: J7 \7 u1 ^, S
+ e$ V4 F, p! v, Y7 x
gateway
( N/ V: P1 Q# [ d: a, \9 D" J- L9 B1 C
- }) H4 r5 [, `7 N7 s1 H I
int uc4577
3 f' r; i. P' {0 u3 G; O! w(
+ `7 {* ^+ M- V0 B8 s9 j) g; wchar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
" r" S$ A$ h& V! S7 g) l
9 w& N& K9 b, a1 ])9 q" n5 N( E, _% h
" W* u5 d( K" D9 N; L' M1 c| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|