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

[二次开发源码] NX二次开发源码分享:循环查找所有的图纸并更新视图

[复制链接]

2017-10-23 14:14:41 2314 0

admin 发表于 2017-10-23 14:14:41 |阅读模式

admin 楼主

2017-10-23 14:14:41

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

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

x
- g1 c, c) s! L6 Z6 Y4 p+ k* l
NX二次开发源码分享:循环查找所有的图纸并更新视图, x2 A4 L$ r2 `$ T
, U; _* J5 O4 y" y
NXOpen C++的方式,其实很简单,看看吧!" M7 j" D8 ?0 c) g( e

0 V! n- S* }# j, T4 J& V9 d- ?/ ~
' l. o5 [" v* Z& a    //Getting Drawing sheets into collection of the workpart9 O( b8 z, Q- c2 ~" K3 h" f
    Drawings::DrawingSheeTCollection *drawingsheets = workPart->DrawingSheets();
  w0 j0 z3 h) Q5 D% Q    Drawings::DrawingSheetCollection::iterator it;
& ~! _. y0 w' e    Drawings::DrawingSheet *mysheet;1 l0 B$ |5 f' c) b. _; W! w

& f- b7 C" E$ e/ G- e8 z  ?    /*----------------------------------------------1 u8 @+ V( U% I2 u$ i* C2 e0 Z1 N
     Here we loop throUGh all the sheets in the part.
9 h6 h  P2 S: z6 b3 }     For each sheet, we open the sheet, update all views in it,: y, S/ c" f2 z3 p- P- W6 I
     And then pop-up a message box listing the
0 }# a1 x+ \" u) n     views on the sheet.  This could be modified to plot out
7 s& e- S1 p) w7 B3 s     the sheets instead.
% `, ^6 o  `+ i1 C. A     ----------------------------------------------*/3 s* e) l2 q6 w4 f; O4 j
    for(it=drawingsheets->begin();it!=drawingsheets->end();it++)/ G! k' C/ N4 @4 q) N; I" I% |9 D
    {
0 d1 }  q  j" m7 B) S0 L! b" o% X. x+ P3 j1 G# K/ A0 G% e
        mysheet = *it;0 `/ B- v4 W0 f+ Q" Q4 O- }8 T+ c
        mysheet->Open();
' a0 F* u# d4 A9 c        // ----------------------------------------------
  f' _) i. K0 X: d- ]        //   Menu: Edit->View->Update Views...; ^& T2 c2 U/ Q6 e
        // ----------------------------------------------2 H# o, N! [6 U
        theSession->;Parts()->Work()->DraftingViews()->UpdateViews(Drawings::DraftingViewCollection::ViewUpdateOptionAll,mysheet);$ L9 }$ U* g2 @# d
% l/ T% J5 q  K
}5 R% L/ D0 B8 W% g) ?
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了