|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
4 b X+ F- }! V: u非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
/ A; V5 r2 i+ Z" _7 K- y: f8 q' t$ I( V) w, b7 x, S) N
Defined in: uf_cfi.h, Y0 E9 v. U1 W3 Y# J' f/ V. v
- A" S& b% N( g; M1 {& \7 Y# W6 M, t
Overview0 X9 v2 V% R0 L
( m4 Y3 A& |0 }1 q
The name returned is a unique name for a temporary file. The resultant
1 Z% }$ P* |' S7 k z, f8 Ufilename is unique from other processes at the time. From a single - k6 n0 k" ^/ }4 l% ?% o
process, filenames will begin duplicating after the first 1,679,615 calls
2 L: Z+ D j. u* p. \" \/ Hto uc4577. Temporary files should be deleted when no longer needed by an 0 A" ^1 X5 V, N; g* {% x5 N$ K7 B7 P
application. If the files are not deleted, there is a chance that the same & j" X$ l5 g! D( g, L5 `9 x$ M2 T
name may come up again if the same user happens to get the same process id ; Y% }' [3 W& \& b$ o
on a later date.
) ^5 o% k! \0 V2 I3 d3 n; `# y$ ?: E$ s
The maximum number of characters which will be returned is 12. ) J- Z! r- n' ]4 f& f1 S
( \- D9 G/ |! G& ^
: F: h8 `/ p5 ~# @Environment
3 W9 }5 B1 ?% B# t, j5 C; z& i" {5 r) q
Internal and External
, u. d: |% f" D! F& O7 O2 b1 Z
8 R' F& K4 C- K3 b9 Q$ n, l( b [% c4 p4 w* g2 [; r! Q
Required License(s)
# _2 A1 C, {, ^8 g1 X7 O* F" Q* C$ N5 I% @# F2 ~* b" t
gateway
/ W; ^! R) c; H
/ ~8 i; W0 w Y0 ^6 G9 Q" W3 I b6 n/ L- g4 B
int uc45771 C6 D; F( \& |8 L2 [* }0 k6 r& M
(
$ I- I6 D. P9 k$ U- a: b/ Nchar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
; h' S5 V+ v9 v- ~! Z) t9 ` w8 y% Y1 u4 V' V( L5 l; m
)
0 L* b4 W- ?; j0 f: E5 S- b" @4 r! a4 W# G4 q. L
| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|