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

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

[复制链接]

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

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

admin 楼主

2013-11-7 17:19:02

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

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

x
偶尔看见的,大家可以关注下!
! v1 m+ }8 _5 H+ W+ ]: U  o& p- f! Q$ G: I: t
ribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb  文件哦
( t1 ?% g9 X' V
$ }2 ?5 P0 o+ z8 d: X# G' a! F5 A) M2 \
2 D0 F7 P7 q8 M- g
/****************************************************************************
) M! D/ h# [* I: l: T7 S: \7 |- dCreates a ribbon from the given .rtb/.gly/.grb file. The file name should not have 5 h3 E8 ~! a) v% b# i1 L
any hard coded path and should exist in one of the Open application
4 a( c, z* ?: ^* B% T- Z' Q. M& Xdirectories. The show parameter is only used to show or hide the ribbon
8 j  V2 d' y5 @9 u+ e, U9 f" bwhen it is loaded for the first time. On all subsequent loads, the show/hide
6 S8 }" Y% j/ |7 S" B& bvalue as recorded in the users registry is used. ' |" Y+ x1 {1 _- Z# F/ r

% k* c. y- N# w1 s% s& zIn order to be successfully loaded, the .rtb/.gly/.grb  file must be located in the
. ]% X/ X0 S3 ?; g; q4 ]! ^: J  G4 Yapplication subdirectory of one of the directories listed in the file
9 i  M, V  v7 i+ d* ^: m0 jpointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to
3 d1 k! l, K% _% q( @  a$UGII_BASE_DIR/ugii/menus/custom_dirs.dat.
5 z' h! K" U& `: }2 ?4 d1 S' d* b! j- D& W
Example: ; o0 m$ H% ~5 g6 T; j
    UF_UI_ribbon_id_t id = NULL; 5 N) _2 A$ B* O( H. H4 ~- O$ X

, k( }2 m) ]2 l; Q1 t# L    error = UF_UI_create_ribbon("my.rtb", 1, &id);
! @1 f# W' ?5 S  @# e+ ?3 v9 D9 H; @+ o; V4 Q' r1 w( _7 J# s& W
Environment: Internal
8 K/ ~. r/ Y6 C6 c- }, p- {( _0 V% ^8 X3 T
See Also:  UF_UI_remove_ribbon  
6 H' v# R/ ~+ f6 _" M# e
6 g! R  f  P+ X+ W! IHistory: Originally released in NX9.0 . f3 k, o5 i/ n( m
****************************************************************************/
+ a" T, C7 ~. h2 R; C3 v" textern UGOPENINTEXPORT int UF_UI_create_ribbon 8 G0 A9 `8 r- i* i, ~5 x8 J
(
' d' d+ y3 M1 }9 d8 w) M6 d      char* file_name,             /* <I> ) w) m$ S" F0 O$ s2 {- D
                                    The .rtb/.gly/.grb file name without any hard coded
8 [& N% G2 K- G7 {3 }* y  i                                    path */ ; m1 Y6 Y$ \( Q9 z6 v
      int show,                    /* <I> 0 N' X" C. G6 e# b" q) S$ S4 M
                                    Initial visibility of the ribbon # c/ F1 m6 n' f% r+ C& {
                                    (1 = show; 0 = hide) */ $ A0 d& q' i3 e5 p$ z3 L1 [
      UF_UI_ribbon_id_t *ribbon_id  /* <OF> & c6 E1 [' [# Z/ D$ O6 V
                                    ribbon id if creation is successful */ ' n# q' Z8 V0 y0 Z. A
);
# m# z8 ]& Z" k6 O( _' \$ O- \$ s3 u  G) c+ C+ i
/****************************************************************************
; M, @+ Y1 c+ z+ W$ ZRemoves the ribbon with the given id. Once the ribbon is removed the ribbon
$ Q1 m* y/ @; [0 H( N/ Kid should not be used.
" L  X& q, Y# R; k! n" B$ m
; l$ ]+ i4 O# V$ ~. b# a0 jExample: 8 U+ P, \* D3 q1 _; M6 e, ]3 ^
, ^! u8 q- I3 c# m& {
    if (id) % a' |( G& o6 B- @1 V" S
        UF_UI_remove_ribbon(id);
; u& o' T  q; L' p3 `5 I    id = NULL;   L0 M8 r9 b6 ]6 T. _. z' ?( V6 Q
2 X2 M- G/ [- v8 A/ |
Environment: Internal
  V5 \( u7 O6 W, R# A. k9 ~! y9 D- W; `" l# z( S
See Also:  UF_UI_create_ribbon  ' c/ l3 K0 S$ l" x: [! e3 Y
7 q  i2 w. L7 `! L9 P
History: Originally released in NX9.0
8 I' E* p1 q( }4 f: I, B( T****************************************************************************/ 0 \$ u$ _$ y! l
extern UGOPENINTEXPORT int UF_UI_remove_ribbon ' @! I$ k  b6 K
(   j& p2 {/ [5 E  ^
      UF_UI_ribbon_id_t ribbon_id  /* <I> 6 V* T4 ^; f- a
                                    ribbon id of the ribbon to be removed */
" ?% C. f. ]2 W5 t2 ^* p); 2 `0 F, S) \7 x: ]& A; Q
0 z* x: |  ]/ h5 C1 P
/**************************************************************************** " s  w/ _+ t& _0 ^! ?
This routine sets the visibility of a ribbon. This routine can only be used ' n4 `1 r$ ?% Y8 f/ R, y  O
on ribbon that you have valid ribbon id for. * L% k3 U7 i/ b7 m' v! \

  _% S6 o' W. F9 wEnvironment: Internal
2 {  o0 y8 p, F  s7 `2 t1 n2 J% Z7 T1 S
See Also:  UF_UI_ask_ribbon_vis  
7 f# b( y' M0 `4 o. y7 s           UF_UI_create_ribbon  5 D0 c9 t2 l% S" P& {0 e: H1 P0 I( R
1 p+ x  d9 O7 G: j1 {; Y
History: Originally released in NX9.0 0 P. c" [3 F( U7 [9 p' ^
****************************************************************************/ , `2 @% d; t7 ]" s
extern UGOPENINTEXPORT int UF_UI_set_ribbon_vis
) m  D3 v; M0 ?# r(
  D6 N1 ~& A  l' A6 c3 J( d      UF_UI_ribbon_id_t ribbonl_id, /* <I>
2 f2 j8 x1 U4 N6 Z0 V, Z                                   Valid Ribbon id returned from a call to ! {% v6 `  S, V: M! C5 [5 |1 \0 [3 E
                                   UF_UI_create_ribbon*/ ) }  f8 b$ F+ O6 q  ~4 Z  ?5 A# R
      int show                    /* <I>
( D' K9 ^2 `0 [' A                                   1 = show; 0 = hide */ ' \! M1 r. m8 e: S9 I8 }2 I- \
);
* b/ u, p- _& j% f% Z3 [  n  b+ T  E+ W: o2 I6 y) w% X) J$ j: s8 @
/****************************************************************************   m# a, j! O+ U
This routine returns the current visibility of the given ribbon. & j  H4 N5 V. i% b$ ]0 M* h

1 i3 x7 q" e* y2 f& C8 W; W$ oEnvironment: Internal
9 y3 m- F3 ]6 t- n( c+ @; t& m( X3 G) \! x
See Also:  UF_UI_set_ribbon_vis  1 \2 W, n5 S% e, y7 O5 V
           UF_UI_create_ribbon  . [" z$ d; W; Y6 c

9 X- Q" k" o5 _7 dHistory: Originally released in NX9.0 & b: ]: Q- d% T& ^: w
****************************************************************************/ ! B" E0 l9 y0 r1 C
extern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis 3 w7 v. \" t. B, v8 |$ a
( / |( g2 G3 G/ E3 E$ T, @9 [9 m
      UF_UI_ribbon_id_t ribbon_id, /* <I>
3 Q/ C' x+ u& ?4 S9 N$ n( ]                                   Valid Ribbon id from a call to
9 ~% d- R1 l( U8 @) F. H. N                                   UF_UI_create_ribbon*/
, s/ Z5 |0 ^2 e8 W/ m7 f      int* show                   /* <O>
# U  B) @* |3 V2 c                                   1 = show; 0 = hide */
; Y$ h7 _! i; A2 j); % i9 A. i4 {- m! K  R
9 H3 t, @9 b+ }

9 e! U5 y. U/ H$ I+ J6 T4 X  _
2 F: L( Y( e. v$ ]  U( T/ U# v
# A% R6 Z( c+ O* @+ z! X; M2 \
#undef EXPORTLIBRARY
. ~$ }7 b& ]& S( f# ~- R! G
8 D5 o% n& N; j% e1 ~#endif /*  UF_UI_INCLUDED  */( K  R$ Q& T# {" H) `( g
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了