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

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

[复制链接]

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

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

admin 楼主

2013-11-7 17:19:02

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

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

x
偶尔看见的,大家可以关注下!
/ {, w/ J8 N2 K/ h2 ?# d
" {8 T6 w% M7 W  q1 O  l$ jribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb  文件哦
" e& r+ o6 q3 r+ M6 C- j, Z7 \9 ~
' p4 P! v0 d4 }: z. K! t5 g. _
* X2 Y* M. @/ Y. a0 L
: d7 v1 S) W  k1 u* H6 l/**************************************************************************** / k  N# z. {8 p  u+ I
Creates a ribbon from the given .rtb/.gly/.grb file. The file name should not have . k% m% r7 i9 b( \7 a
any hard coded path and should exist in one of the Open application ( N. M7 J+ W9 ~- E7 i8 j
directories. The show parameter is only used to show or hide the ribbon , M+ o& m7 W& y9 \- O* O9 _8 Z
when it is loaded for the first time. On all subsequent loads, the show/hide
9 t: o6 ~" f$ c* s. Avalue as recorded in the users registry is used. / ^6 M0 {3 U# D( b$ b7 W5 z
- H9 @: s6 F2 D
In order to be successfully loaded, the .rtb/.gly/.grb  file must be located in the
+ Z3 t2 `' V! B9 O0 V; [. Xapplication subdirectory of one of the directories listed in the file 2 \, n/ a3 Q& W+ c- Y$ R; u* X
pointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to
6 k! j$ {# b) J5 z: C/ D) H1 @$UGII_BASE_DIR/ugii/menus/custom_dirs.dat.   r/ [; Q8 H% `5 z. v

1 W2 U, s' V+ B. Y, Y! sExample:
$ k" d" U5 N% D: @1 f    UF_UI_ribbon_id_t id = NULL; / s; k) @' ~! ~- {) v, H
4 u! L$ w0 p& N
    error = UF_UI_create_ribbon("my.rtb", 1, &id); 6 _9 ]) G. ^% G, |) q: R0 L+ @
9 ~3 d  r, N, R6 A6 S1 V1 [1 z, f
Environment: Internal . S+ \2 R  ]$ Z: g

  r; f2 w: E- B# T2 P  l) sSee Also:  UF_UI_remove_ribbon  5 I& o& a! Z" B- E, \! O
& m5 c. K$ r4 U
History: Originally released in NX9.0 $ G7 W4 ?+ W: G
****************************************************************************/ $ r& V! B% k/ f. V5 v  D; q3 |
extern UGOPENINTEXPORT int UF_UI_create_ribbon
& D; J: K( ?0 o1 s; l% A9 [1 F" ~/ v( ' A, [; D+ t6 v3 l2 ^. Q9 f
      char* file_name,             /* <I>
, k" ^$ D& d: d/ f- c* Z                                    The .rtb/.gly/.grb file name without any hard coded
! K7 W! P% H# m$ u: I% X                                    path */
! j  [( p$ T0 D      int show,                    /* <I> 0 z) [2 F4 y8 v6 C$ _, U: _) o+ w1 a) t
                                    Initial visibility of the ribbon 8 Y$ h: z/ B7 @2 n& N( R' r6 k
                                    (1 = show; 0 = hide) */ 6 W$ G) C1 m, q) g3 f
      UF_UI_ribbon_id_t *ribbon_id  /* <OF>
! `4 s+ c$ I) c/ ]- @: }                                    ribbon id if creation is successful */
( K8 N3 L0 F% e" D);   X) t% F+ I4 x
( V6 B: L3 B8 ^7 x8 p
/**************************************************************************** 9 h; `' j+ G7 ^' A: B
Removes the ribbon with the given id. Once the ribbon is removed the ribbon ! b7 {& A; ^1 ]' I6 J) z% b
id should not be used.
9 {, x( A) e2 a: I( B% I* r3 Y, |: L" n5 o/ S, e- ^+ C
Example:
& H: j. x- ^& D( x2 X) `5 A
, t0 }, \: i; I0 d  @# O    if (id) + d3 c* u- Q; U/ a4 G0 V
        UF_UI_remove_ribbon(id);
  R) H) A8 u! y7 h    id = NULL; ( W+ G# Q( i' I

. J  L# j$ `8 r) d1 ]8 e) e' Y" YEnvironment: Internal
6 N1 @" s9 ]) g5 z2 B' K9 i( |4 S+ A/ a" ^
See Also:  UF_UI_create_ribbon  ) T. }: U) U7 I% h" _6 C; U
+ b1 d$ T% y( U; H
History: Originally released in NX9.0 0 A2 \6 d1 Y4 M* H2 @5 s! O
****************************************************************************/
% z6 B( j% F* Fextern UGOPENINTEXPORT int UF_UI_remove_ribbon + ^7 a. U. n# _$ _
( + C) b3 [) M" h) \
      UF_UI_ribbon_id_t ribbon_id  /* <I>
, R2 Y5 g3 e, f4 O; D& [- R                                    ribbon id of the ribbon to be removed */
- n# h) X8 Z; C, e# ?# ~); & q3 V/ W1 ~) ^. Z9 \' _

" r2 H/ Y+ ]# N) F  B/**************************************************************************** 7 c, X/ l) w3 V, R" b) K
This routine sets the visibility of a ribbon. This routine can only be used 8 N* r/ [% h" @/ \3 w/ M, K
on ribbon that you have valid ribbon id for. " h  l) ]& b1 J: O- |; {7 P& p2 i

6 r" x3 [# m, uEnvironment: Internal 4 e- r) w& g  y/ A

' J) B/ |2 |# s8 o+ N2 `See Also:  UF_UI_ask_ribbon_vis  4 ]9 t  V0 `2 r' M
           UF_UI_create_ribbon    r& a, U( Y2 _: W9 r

9 t( {2 S! I. T% MHistory: Originally released in NX9.0 7 k+ u$ ^9 \4 M+ }: @
****************************************************************************/
$ B6 u3 v! Q; C) T4 y& Yextern UGOPENINTEXPORT int UF_UI_set_ribbon_vis
. [# D# S0 A7 T# l% p( # x, ^$ O) u8 ?( s6 D1 W7 P: f5 _5 r
      UF_UI_ribbon_id_t ribbonl_id, /* <I>
+ X  U1 H' Z$ l9 Q& V                                   Valid Ribbon id returned from a call to * Z3 C2 r2 I" z% R) k
                                   UF_UI_create_ribbon*/
  c+ a" V" S# `/ E* r) |) w6 R  `      int show                    /* <I> 5 A$ Y; H5 P7 W# q: `
                                   1 = show; 0 = hide */ 1 u1 _3 d2 q% Q: n0 G
);
5 N3 D8 j2 G: t: A3 L, O" [8 y* _) @4 L9 x! ^0 W
/****************************************************************************
; h. J# s% x6 O$ x" fThis routine returns the current visibility of the given ribbon. , Q! }, w5 w+ a/ J0 R0 J
( D; n' x& n( b. _8 ~: m
Environment: Internal
# a9 Y) K1 K6 _$ A3 V4 _" X* L% E3 a- d' h8 x' M. ^; V  ?% I' T
See Also:  UF_UI_set_ribbon_vis  $ Q. t7 }& U) o0 {3 r) r
           UF_UI_create_ribbon  
" l7 W4 {/ ?" A0 y5 h/ f. t) ], ?* ]* C' I% z
History: Originally released in NX9.0 1 c" o! ]! M2 C# \
****************************************************************************/
, b) Q- a" M7 S& zextern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis
- H7 C% G! D- p! S5 d(
( w6 n8 ~  H8 P* B' p8 \      UF_UI_ribbon_id_t ribbon_id, /* <I>
/ c8 D& f4 a" h, ?) y4 N                                   Valid Ribbon id from a call to # N$ |4 C( i9 b+ t* F& K7 {, Q
                                   UF_UI_create_ribbon*/
$ l- l( G7 b' t% D      int* show                   /* <O>
+ ]' c$ p' y! D* }/ m                                   1 = show; 0 = hide */
0 p+ c% w% N/ _' {/ Z7 j' M);
5 @( `$ r& F" Y# \
: d7 @" x8 N, q; f( |2 V+ x  G7 a  m6 N, p. i
+ C+ p4 K2 l# x: S
0 A) c) J5 @2 E; ^
4 V; E6 I) v, z% f, U: J. E9 Q
#undef EXPORTLIBRARY 4 [% L8 n; c+ N  E/ D$ @8 G8 `
6 B. S8 A. F7 V# B! D; C( m
#endif /*  UF_UI_INCLUDED  */5 i% }8 D1 g9 e) S+ O7 k. a, X% y
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了