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

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

[复制链接]

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

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

admin 楼主

2013-11-7 17:19:02

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

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

x
偶尔看见的,大家可以关注下!
* n/ `& ]8 |& f7 x+ d7 d( B( O% O3 B5 C# S6 c" \8 k  i2 {
ribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb  文件哦! m$ q/ V. M( r
9 Z' H' T9 ?7 f+ J3 _3 m0 U
; p; Q" G  l. M' J7 I4 H# N
; B+ H: z* l# x8 F% p  F
/****************************************************************************
! E7 y+ x0 q" C# E& {9 yCreates a ribbon from the given .rtb/.gly/.grb file. The file name should not have 2 {. O  J9 h  F1 N! f9 B+ W5 b
any hard coded path and should exist in one of the Open application
. ~* g6 E5 q0 G$ m4 o% M: fdirectories. The show parameter is only used to show or hide the ribbon $ m+ a! t1 l% B9 c: y: `7 r$ B
when it is loaded for the first time. On all subsequent loads, the show/hide
$ S* M! W1 p$ _) ivalue as recorded in the users registry is used.
( p8 s% v" ?6 ~  o4 Q
+ P; {' _& V( _; S  eIn order to be successfully loaded, the .rtb/.gly/.grb  file must be located in the
+ ^  L2 i! w! R$ G: @application subdirectory of one of the directories listed in the file - m+ y6 T- J# t) a3 X) w
pointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to $ Q; E* Q* F5 n; {" D
$UGII_BASE_DIR/ugii/menus/custom_dirs.dat. % D* J" M6 l+ L6 P% W) t. @
0 G  I( ?' |! G) W# Z( k% C7 a
Example:
$ X& x* N, S; x* k) E! z    UF_UI_ribbon_id_t id = NULL;
1 _, R: D( H, Z. z8 j$ V0 F- q5 `
) O$ e! f7 ]- o  v# u+ ^3 g    error = UF_UI_create_ribbon("my.rtb", 1, &id);
0 g8 [$ @! \+ w" N, f/ y: n0 V" ^/ E: f; S
Environment: Internal 4 d% V' `8 u- l. H( h

: D: B  o: w. d; iSee Also:  UF_UI_remove_ribbon  * \/ ]8 `- {: S) O1 V/ o+ \% F

0 V  F$ m5 R0 h: pHistory: Originally released in NX9.0 : e7 ~7 w7 Z/ s# @3 h/ O0 E" J
****************************************************************************/
$ X& ]4 N3 H' w# Hextern UGOPENINTEXPORT int UF_UI_create_ribbon
# o4 \% R* K# `  \, @. r(
5 ^) Q8 r) S( O3 a5 V      char* file_name,             /* <I>
1 ~- E1 P2 M" l, D: |" O  U                                    The .rtb/.gly/.grb file name without any hard coded 2 O- g% x3 f+ x7 q2 c: \* M
                                    path */ ; E: c+ e8 z! i( ?" b9 D6 p8 M
      int show,                    /* <I> 1 H4 O5 b0 P& I2 G
                                    Initial visibility of the ribbon
, V) ]! W" `- W/ Q, {6 R) l+ `) v                                    (1 = show; 0 = hide) */ . g/ W' `$ F8 R5 g
      UF_UI_ribbon_id_t *ribbon_id  /* <OF>
7 {- _  g$ L8 ?8 U+ e, `                                    ribbon id if creation is successful */
4 i6 o! h, i1 S); ; _9 n5 [7 }2 ?" c6 e
6 ]5 c- R4 D; p; Z0 v
/**************************************************************************** " @8 L6 I" Z' w$ b5 H
Removes the ribbon with the given id. Once the ribbon is removed the ribbon ) A  a& L1 S, ]+ z/ s/ \
id should not be used.
  M( u, m/ z1 O9 |- y' b$ k  r, H# `4 G6 }' m# f' C' T
Example: 7 G( l9 d6 H7 j
# G$ o% }6 G$ A+ V: F  N
    if (id)
% a8 V$ d! G$ ]$ w  n- r+ ]        UF_UI_remove_ribbon(id);
& G7 X' r3 }7 v# R/ K    id = NULL;   h2 ^- S8 P, ?# I7 E2 k$ ]

% t2 R% W# u% p  n. mEnvironment: Internal
$ A9 W1 g. Y' [& U& q( Q8 V6 ]8 ^
4 N9 T' @* Z, F$ O. e; K+ @See Also:  UF_UI_create_ribbon  , K1 l) D# g- [2 H& U
+ V! ^) a0 V' Y, P8 a/ d+ U
History: Originally released in NX9.0
& Q4 ^3 w) I, |2 n1 D/ a, U. @****************************************************************************/ # k3 T6 e7 g$ U6 @% m) G
extern UGOPENINTEXPORT int UF_UI_remove_ribbon
9 d$ T  E9 V) i: x( , s5 B) g8 V4 a% ?, ^
      UF_UI_ribbon_id_t ribbon_id  /* <I> , K5 B6 G* I1 U  i4 r+ Q
                                    ribbon id of the ribbon to be removed */
) y0 Q, \( Y: r$ u/ v4 [5 f); 1 f- @$ \* e7 e5 F5 D  p
- Z" V. j' x2 E! O
/****************************************************************************
1 R% s2 M8 V- t6 _% c1 oThis routine sets the visibility of a ribbon. This routine can only be used % f* T1 J! `2 g! `9 q$ f
on ribbon that you have valid ribbon id for.
8 L3 [/ \! v! X4 K/ C$ u/ s3 P7 D2 q8 _  ?) V
Environment: Internal ) @2 |  T" K! h& O! s5 K
( `$ x6 \- j8 J& _1 Z3 d
See Also:  UF_UI_ask_ribbon_vis  ' A4 X1 D/ n2 H% T2 g* Q+ H
           UF_UI_create_ribbon  
/ C+ m/ J. @/ d. @& Y' o7 a$ r7 d8 g- |0 p; |& b( n
History: Originally released in NX9.0 9 L+ g" v# \$ x: C3 I2 g- i
****************************************************************************/
3 {6 x) s8 P! \. K6 s/ Qextern UGOPENINTEXPORT int UF_UI_set_ribbon_vis & o$ k, q7 ]9 a2 j" G- P8 @) E
( # z. Q: r6 K( |5 r& @. ~6 T9 Z
      UF_UI_ribbon_id_t ribbonl_id, /* <I>
8 U3 C0 h. g' t% {                                   Valid Ribbon id returned from a call to
: y9 R/ |! T! T9 h/ m                                   UF_UI_create_ribbon*/ * _, M9 Q( a( D7 C3 {1 ^1 N1 S
      int show                    /* <I> ' [4 d- W% o& {8 u; {
                                   1 = show; 0 = hide */ 5 |7 t$ f; m% C8 D2 ?- t, h
); & n7 B% B* n9 w8 L" A

% F6 q5 R" j  {) {/ r/**************************************************************************** / H3 P  f) ?3 ~2 N% s7 W
This routine returns the current visibility of the given ribbon. 5 x& K4 G5 r( }
% o2 ~5 ^& T1 {: _" L6 `
Environment: Internal / K/ i1 m) h, P# S4 w* A9 i, J7 u

. ~5 F& [! j9 q+ TSee Also:  UF_UI_set_ribbon_vis  
( E+ V: @+ }8 ^; \0 _0 z" j( Z           UF_UI_create_ribbon  
5 l# d7 r1 F" Y8 ^: s9 p" {  u' ]6 l: M: e7 b1 C
History: Originally released in NX9.0
' i+ @$ m7 B0 Z! @$ N, |" {' u****************************************************************************/
/ V8 ]8 T& v( B4 n7 e4 rextern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis 1 {. C+ q* C7 r" `* \! [
( ' m" A( E8 }+ r8 A% p
      UF_UI_ribbon_id_t ribbon_id, /* <I>
4 B  G, R9 G4 i7 g                                   Valid Ribbon id from a call to " U/ c) g8 H9 r1 J7 Z: m
                                   UF_UI_create_ribbon*/ 4 F( m/ S( C8 j" B3 S8 X+ ]; B
      int* show                   /* <O> $ C9 w# w$ a+ S. W6 b
                                   1 = show; 0 = hide */ 5 e5 J& U1 @) ~8 X; e2 u7 b6 ?+ K
);   J$ l, `- P% M  f& a
- _+ I" w! _( _5 u
, m# }/ _' D1 P% _
+ B( V9 E2 H# k- R
9 M! }; t& D( f- B1 M5 F

0 ]8 G0 }2 V" T9 J! K% g3 l+ H#undef EXPORTLIBRARY
. B5 S! n6 o6 R+ ^% P1 p7 ]# @! D( b; ~
& n7 b. j# I" _3 M) p#endif /*  UF_UI_INCLUDED  */( F$ C+ F" R: k0 B3 [: H6 }
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了