|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发:创建一个临时文件的函数uc4577
9 x; @! P# V3 E3 q: @% ?2 K非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
1 b# y& E# g# _1 ^% ~
8 L6 C4 A( y% l+ {$ BDefined in: uf_cfi.h$ m2 ]! B" Y/ f$ o& w( I2 }
# g8 o2 w1 C! ~6 w4 s$ I- G
! j* [3 L: v4 q) \3 X& i
Overview
5 {5 a& B Z% u( P( O5 F) {) _2 g) |2 s3 c6 v
The name returned is a unique name for a temporary file. The resultant
5 Y3 V- W+ b/ L" Ofilename is unique from other processes at the time. From a single 5 r* H6 _& g' l8 [
process, filenames will begin duplicating after the first 1,679,615 calls % i& l- v9 u1 F. z
to uc4577. Temporary files should be deleted when no longer needed by an
9 F* R& j# h. t/ D/ H, lapplication. If the files are not deleted, there is a chance that the same
: M1 Q8 `, R& f& Yname may come up again if the same user happens to get the same process id
% L% ^& V5 ^+ A2 n. p/ Eon a later date.
! r, o( y6 `9 H/ C+ V$ F$ R9 \3 E0 {" s& n5 H) A! ^
The maximum number of characters which will be returned is 12. 1 F( \( F1 _# _ |6 ~7 g
! |' d; }: y9 M! {( X8 f& T0 y" M
- G5 j, [6 z( Z, CEnvironment
/ R3 Z, h. e1 d U0 g6 z1 d$ Y3 z& L, O; N! N8 n
Internal and External ' g( e" K4 N- k! Z R# r1 P
' W8 Y, z& v- V1 x) W9 Z9 v# W; ]4 K4 b5 d; d9 Z# o
Required License(s)
: ]/ J7 G: v- `! R+ O y! s# p4 G; L6 W
' M* [% Q7 V5 z# igateway9 J6 a( s4 a* X# A6 u$ C* v" z" Z
0 R' d. L& _- o4 u
/ n" L; [2 a. v0 ?int uc45776 e/ ~# W$ o# Y$ G) i. @
(
% {' q/ R, A/ ?' H1 i' Ichar fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]
' @) @# b; ~4 P) U. o- g0 z* J0 D J
)% T" L. P' \8 F# `. f
; N M: k7 U# y _& |8 x| char | fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] | Output | Unique filename |
|
|