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

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

[复制链接]

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

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

admin 楼主

2016-3-28 16:55:02

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

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

x
UG NX二次开发:创建一个临时文件的函数uc4577
1 @% m. _5 d' t2 w0 K  v0 R非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!8 m8 h! Y+ B: r* r! v4 `* O/ w

" O% w5 o( W5 e9 Y" G& P( I. ?Defined in: uf_cfi.h2 j5 S: G0 M. W
# t: P8 O) i! G# U6 b$ _. ?) W
/ G2 R) M0 x: T
Overview+ t+ H) r) \5 l, I# Q) ]

& V1 Z0 A5 z. b1 b& J* MThe name returned is a unique name for a temporary file.  The resultant " K5 l) r1 X8 {, Z; @; X4 |# E5 H
filename is unique from other processes at the time.  From a single
; i+ H: v" {/ e+ q- i) I: H5 wprocess, filenames will begin duplicating after the first 1,679,615 calls 3 T9 C7 L2 Q6 |9 @5 k$ f, F9 V- R7 K
to uc4577.  Temporary files should be deleted when no longer needed by an 4 i; w3 v3 G0 ?; x# a0 N# A' V
application.  If the files are not deleted, there is a chance that the same
) t" s# G6 j* {" Aname may come up again if the same user happens to get the same process id
  n" j2 j' r$ Z' q0 oon a later date.
$ t" d% m5 }8 |6 E  K' ], A) {+ t2 x  t% g5 U0 @! A0 Z0 N
The maximum number of characters which will be returned is 12. 6 {/ C$ j, M1 r1 M% z% x
/ O# J) e5 h) Q* m% D

5 C1 t, A0 A/ UEnvironment1 m5 v. Q% m" q& h9 {; k3 l9 b: W

" n  l! L' F0 \  kInternal  and  External & e9 c( t( G  j  Q/ L
# M, V0 O+ v' m$ [* A9 x
% ]& V. [% M. e8 e. N
Required License(s)/ q6 d& j! U9 l+ d: o  n
8 f% D; g9 A# |, X
gateway
4 U2 d$ u5 }4 o! q* S" {- Q  O8 G- y8 r
5 j. K# v2 C2 I
int uc45775 n/ v# B6 F; ?! j+ c4 m
(
% w, a2 K5 ^- t8 A3 D" `char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]  
  K" l) q/ p( g2 I/ b* D7 B6 @: P
)
% X- A# ~- q5 e5 e# o+ z7 U- v5 v! J6 w- a; @, j, E  t; w
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二次开发专题模块培训报名开始啦

    我知道了