PLM之家PLMHome-工业软件践行者

[二次开发源码] UG NX二次开发:创建一个临时文件的函数uc4577

[复制链接]

2016-3-28 16:55:02 2325 0

admin 发表于 2016-3-28 16:55:02 |阅读模式

admin 楼主

2016-3-28 16:55:02

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
UG NX二次开发:创建一个临时文件的函数uc4577
: U5 X; q) _% h$ x! l2 |( z7 t9 X" N非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!2 j& l0 \% V. N6 @  P" Q: A8 I

2 z# R2 i. Y2 P* o2 wDefined in: uf_cfi.h: s( Y) T2 J. U& g6 e

- q" Z# P% @; k1 P  F6 z# G8 [/ Y: k" m/ H
Overview. |" C9 r1 ^# T" \- j* p0 L9 W. R. {
7 u4 |. r- W4 L, m: z& n
The name returned is a unique name for a temporary file.  The resultant
& p+ N  Y$ j" G. s5 }% hfilename is unique from other processes at the time.  From a single $ b8 y2 H0 p' p3 O
process, filenames will begin duplicating after the first 1,679,615 calls
: L6 B0 g# {' A% r$ Vto uc4577.  Temporary files should be deleted when no longer needed by an ; Y/ n3 K1 B" c  Q6 Y
application.  If the files are not deleted, there is a chance that the same " Y  M9 Y, L8 h& P( h  E% \
name may come up again if the same user happens to get the same process id
" D/ Q; O2 c& Gon a later date. ; e/ x( s: u. B$ N" y; n0 z  L
9 D; I7 a7 ]& j) D. ]3 Y
The maximum number of characters which will be returned is 12. " w+ F8 K. O! Q: A7 Y

3 w8 U8 M7 C- m# T. e1 W- P+ ?* p: W& j: f  a
Environment
5 }0 @- U. M) b7 o/ u* j1 d' k  n$ |) R! |" ^7 b. W
Internal  and  External 7 f0 w& d5 n: t( H+ j

) A5 b% }, t1 l! U3 K$ y9 B8 ]- E1 L( ~7 B3 R* R& E
Required License(s)
  c! m' X6 D1 i1 X  k8 f4 C9 J
2 |0 x# T4 I. g7 O6 b. Z# @gateway
8 o9 E. I. Z, ^3 ~" J5 [  K5 b: U6 j+ \

4 c  h$ \6 n+ ?* Kint uc45777 C$ {% ]6 Y! l# c
(4 a% T( E. G6 a5 g+ R6 F
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]  1 A1 d- u! U: e  n* \$ B" [6 t

$ w& @$ D# G" O# z" s8 ?2 W), ^1 E, q5 a; O) D+ n, K6 y$ `

5 [: ~- V4 [! }! d7 @4 S
charfname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ] OutputUnique filename
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了