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

[资料] NX 9.0 上面的 ufun函数也有很多更新,比如关于ribbon界面

[复制链接]

2014-4-16 11:31:11 4508 1

admin 发表于 2013-11-7 17:19:02 |阅读模式

admin 楼主

2013-11-7 17:19:02

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

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

x
偶尔看见的,大家可以关注下!
9 k) H2 V5 o; W0 l
% @1 Q" h/ J2 J6 f. `* m& cribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb  文件哦6 G5 f- |) l- H0 C+ P
5 c0 d) \) x) i1 t2 x

3 ]) T2 j* e5 V1 c8 S
! G$ P# C3 ?3 w2 a( S% N% U: A) t+ ~/****************************************************************************
( k  N1 @6 A; M+ C( V, h! OCreates a ribbon from the given .rtb/.gly/.grb file. The file name should not have % Y/ c4 [/ {1 m/ i8 X% C( z
any hard coded path and should exist in one of the Open application
5 N8 H- J) _9 ^% }7 X7 m2 i1 \directories. The show parameter is only used to show or hide the ribbon
1 Y: [8 I% R/ {' I5 F1 Z9 f: G4 e6 c4 Twhen it is loaded for the first time. On all subsequent loads, the show/hide
5 k. M. J) w$ p$ g% ?, e- dvalue as recorded in the users registry is used. : J2 d2 O/ @3 L0 J3 }# ^9 m2 k

; f( `2 ?- Z; ^) a  DIn order to be successfully loaded, the .rtb/.gly/.grb  file must be located in the
/ K8 V) O9 S/ g& Napplication subdirectory of one of the directories listed in the file
4 I( Q, F' M* h! S0 v) upointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to " g' L& M5 ^% {! F1 a
$UGII_BASE_DIR/ugii/menus/custom_dirs.dat. : m* z( i$ U) g: m6 \5 A" [1 o
$ y. p3 V3 |4 O
Example: % r4 x5 }- }- k+ [& g
    UF_UI_ribbon_id_t id = NULL; % y4 g7 ]- D: U2 t2 {
, @5 @& {0 W9 M4 |) v
    error = UF_UI_create_ribbon("my.rtb", 1, &id);
$ K, r8 X+ p' N1 i/ q; N8 L( O% k5 w+ j, ]
Environment: Internal 5 `. u6 S  {, o9 ^1 t7 Q

& n9 |/ s0 |1 V% D/ YSee Also:  UF_UI_remove_ribbon  ) B4 r" @0 {5 u6 \( ~) U- i6 Q5 [* F
5 Z3 C" s* N# d
History: Originally released in NX9.0   L; e8 @, z6 t+ e
****************************************************************************/
( }% J) \' E3 K2 Vextern UGOPENINTEXPORT int UF_UI_create_ribbon
! F  k& Q4 n; R: }, l& V( , {! C: }! H* V( h; h# O
      char* file_name,             /* <I> 1 v+ Y' b) ], ]1 o
                                    The .rtb/.gly/.grb file name without any hard coded
) K" P+ s, G, w                                    path */
( n2 x6 N8 c, U      int show,                    /* <I>
! p& U( H7 X" X! C( Y* v& s                                    Initial visibility of the ribbon & w2 t! d, a3 O! `
                                    (1 = show; 0 = hide) */
. \7 q7 l1 K5 f5 h! x  X0 w      UF_UI_ribbon_id_t *ribbon_id  /* <OF>
" Y9 v6 t! N* w( A& O                                    ribbon id if creation is successful */
( ~- `& S' Z+ F7 I2 d  t); 0 j& ?% y% O' b  K, B9 _4 z
9 t; Q2 k* j* q3 V$ x2 w
/**************************************************************************** ) |; J% b* c: G4 j% L7 c
Removes the ribbon with the given id. Once the ribbon is removed the ribbon
1 z2 f" V1 A. w( U+ wid should not be used.
6 O) r% w- N/ ?$ O# i
% I+ c4 k* c* r. L: ~' ?+ }6 P, jExample:
; O, g' ]" k0 d7 S6 S/ k+ Y! {- e' p( h& _9 C3 K7 u1 L7 I
    if (id)
% f7 e8 l/ w/ E. `; L" |        UF_UI_remove_ribbon(id);
8 Z/ K8 _# C; q& \7 h) `9 J    id = NULL; ; E# A/ |6 t6 T
+ E; V4 u/ Z' d7 L1 G
Environment: Internal
) _1 a, Q$ O2 i' q' K( l3 e" s1 B  e2 ^
See Also:  UF_UI_create_ribbon  2 W$ l3 W2 }8 q% q/ ^* G

0 {1 ?% B! Y: K1 K6 |& [History: Originally released in NX9.0 7 N( l, x. Y  `  c8 ~
****************************************************************************/ ! M$ X/ V% {/ k) q9 u6 l" P
extern UGOPENINTEXPORT int UF_UI_remove_ribbon
3 f6 P9 k) n) S. {(
" {! ^7 Z1 D. t; J* B) \      UF_UI_ribbon_id_t ribbon_id  /* <I>
; c2 f* V# K$ Q- T& ^# |$ q3 v- a" V                                    ribbon id of the ribbon to be removed */ 4 v" M" N1 c+ J+ A, p9 v8 |6 ~
); 0 I% D( b7 L* J

0 M$ X+ n$ D2 N$ m/**************************************************************************** - ]" P* ^8 Q7 t3 e3 o% D
This routine sets the visibility of a ribbon. This routine can only be used
5 z4 \4 B8 o, m7 Mon ribbon that you have valid ribbon id for.
0 B7 ?7 o) H7 C4 @# R
. G+ e1 y& i  D; m0 P8 S% vEnvironment: Internal
. W1 g  Q  C( x
' O$ V& k, x+ x7 l, KSee Also:  UF_UI_ask_ribbon_vis  ) P" {  P* B' G/ l2 t! J6 n' z# R
           UF_UI_create_ribbon  $ u, L, z# O* t
! E/ Q; x3 l$ W; b9 u
History: Originally released in NX9.0
  ]( S/ {0 C+ X5 P1 Q0 J% N****************************************************************************/ ' G5 N# v& z& X/ y! S; E0 k1 K: t8 A7 V
extern UGOPENINTEXPORT int UF_UI_set_ribbon_vis 6 |2 }. t4 f9 _* \( Y& F
(
+ v: n$ @# E1 q$ `8 Z! h8 G      UF_UI_ribbon_id_t ribbonl_id, /* <I> / l5 P1 v' z- }- u
                                   Valid Ribbon id returned from a call to + D1 A% h* Y+ z
                                   UF_UI_create_ribbon*/ 0 u& V% }# |0 s& t$ Q
      int show                    /* <I>
4 w" w# ~" P1 F) l/ E                                   1 = show; 0 = hide */
: ^2 y- n( B8 ?+ R* M5 Y); 4 Q- H: R# r, N5 u0 C
8 p8 `: B& Z* s
/****************************************************************************
8 D7 h# x8 _! qThis routine returns the current visibility of the given ribbon. % c- J# n8 s6 k: X# u- q* j
/ e9 z. O. b  o
Environment: Internal " w. ^4 M: y. _: F: e1 |
# @- C" n& z7 P8 ]; w1 V
See Also:  UF_UI_set_ribbon_vis  9 d7 W, {+ @8 }3 b
           UF_UI_create_ribbon  
" J: S) w) W4 W( [" q4 b7 H
  ?$ }/ o' N0 G/ o8 k- Z7 ^History: Originally released in NX9.0 4 ?4 z3 e+ R* R9 n) h& }8 r$ E. `' _
****************************************************************************/ 7 L0 L) I! b# X9 Z  w
extern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis . N7 h' [. P! }6 o
( 8 x5 p+ Q; s6 ], O- l( \
      UF_UI_ribbon_id_t ribbon_id, /* <I> - I9 a; o# A1 x7 N# {: ]: F
                                   Valid Ribbon id from a call to   W1 C& n! ~/ C! l& ~& S2 o9 c
                                   UF_UI_create_ribbon*/
9 c; W; z+ O: t! r      int* show                   /* <O>
! ?4 X* X$ [- H3 u- g7 x4 H                                   1 = show; 0 = hide */
8 g" S; ?: X1 X+ M+ ]* E); * N; h% H* A4 l1 E

5 R& j" ^/ V9 T3 }" b# w
; D" o: ?1 d0 r5 B6 p4 m% V# O# D. ]3 C" i
7 x1 ~. a7 h4 E; i6 V

5 a  f: J2 m6 A) ]#undef EXPORTLIBRARY 3 _" k  o3 `" ?2 I. d& m( c5 t

+ T: P5 L0 q( {" \3 ?6 ~#endif /*  UF_UI_INCLUDED  */, C( _, z( z$ d- d% F- f9 `( V
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

Buguin 发表于 2014-4-16 11:31:11

Buguin 沙发

2014-4-16 11:31:11

求问大神,二次开发函数在哪查询?帮助文档已经下了,没找到函数呀
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

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

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

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

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

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

    我知道了