PLM之家PLMHome-工业软件与AI结合践行者

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

[复制链接]

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

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

admin 楼主

2016-3-28 16:55:02

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

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

x
UG NX二次开发:创建一个临时文件的函数uc4577, ?) |: U8 e! d5 H
非常ok的一个函数,特意放在这里,供大家使用,可以随机的创建一个临时的文件,如果代码里有每次不固定的字符串,可以使用这个函数哦!!
- \/ q0 a8 M, C1 t8 }$ }/ \+ }% B( A
Defined in: uf_cfi.h
9 `3 m% D1 ?& r6 A8 `6 }# L1 T! A * C" O1 u% S. L: b8 t6 H

. e' G8 ^0 B5 f4 j3 dOverview
1 J( L/ T$ k6 T) d3 j7 H
& R0 K( J2 _+ t& T8 v6 nThe name returned is a unique name for a temporary file.  The resultant 6 [. @8 c4 y& B! @% V# k( m3 ]# H2 L
filename is unique from other processes at the time.  From a single
3 g$ q" l4 U; Q9 v- Eprocess, filenames will begin duplicating after the first 1,679,615 calls
+ c* E  _# j( K% Oto uc4577.  Temporary files should be deleted when no longer needed by an 2 }, M1 s$ \- y/ M6 ?* r7 d
application.  If the files are not deleted, there is a chance that the same
. i. }/ U% z9 ]: ?; }name may come up again if the same user happens to get the same process id
8 t# `1 \% \- K! qon a later date. ; N! R$ r$ t; O2 s

1 Q9 h* H% y. y1 }8 d7 o) RThe maximum number of characters which will be returned is 12. 1 \( c7 m1 s  K7 x

& V  V" W0 a+ [7 T/ Q5 f- t% V, _( u  m5 x+ O
Environment
& j8 p6 f7 l  `& k4 Z4 g# J
7 B8 n$ j. ~4 B; ]Internal  and  External
! V' M$ f" }& @' b; Y. m
! c9 R$ W' A3 Z" u. J6 H$ u" A
( q+ u4 f4 \8 u# S" H* [8 |Required License(s)
+ q) _) a0 A- v* G/ p5 B6 v) Z$ G" G4 g# Y. \) L
gateway1 @# I7 g$ b9 K6 i% h- B
0 _4 i2 Z" e- ?6 ]" s% Y# ]
% g4 T% ^$ e9 e5 y% B
int uc4577/ X3 ~' a3 f( l1 R" |! v$ t1 T  G
(# `( t9 v: v6 Q0 u  Z0 U
char fname [ UF_MAX_UNIQUE_FILE_NAME_BUFSIZE ]  
# B# B$ @1 l* a" O  v2 S0 y7 s6 U* h. E( k$ P' z
)6 ^8 S9 z7 M2 ?2 a+ q4 N8 }
+ E; e% m7 m6 w- o2 v+ q
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二次开发专题模块培训报名开始啦

    我知道了