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

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

[复制链接]

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

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

admin 楼主

2017-10-23 14:14:41

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

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

x

! ?* _+ f6 ]1 _& y% NNX二次开发源码分享:循环查找所有的图纸并更新视图
8 V- {7 c1 J8 Z* y: a( i( O; V& A
NXOpen C++的方式,其实很简单,看看吧!0 M- j- ]& k0 e
4 y' |$ T+ q  t/ Q9 a

: p' j0 b3 ?& ]; I; m" b1 Z2 j    //Getting Drawing sheets into collection of the workpart
6 i% ~3 o6 a6 f" I  `$ M- t    Drawings::DrawingSheeTCollection *drawingsheets = workPart->DrawingSheets();# K! ~" e, r* Q; a3 a
    Drawings::DrawingSheetCollection::iterator it;) y( c2 x7 V+ ~3 u% H
    Drawings::DrawingSheet *mysheet;
5 x" n& i7 Z3 ~8 r" P
$ g& g  Q4 h* S  i    /*----------------------------------------------% {3 m! {" _8 }- M9 A; Q: ^
     Here we loop throUGh all the sheets in the part.
& M) Q/ |6 C  u$ c     For each sheet, we open the sheet, update all views in it,
+ s% J2 N  H! X! F' G+ I     And then pop-up a message box listing the / z+ c3 K& W2 j/ j' k* ~
     views on the sheet.  This could be modified to plot out# H; N4 e& b4 i& `
     the sheets instead.
# n# B% e/ F; y: `5 K( }/ I5 f     ----------------------------------------------*/% Y9 d: x2 V& c2 ]3 V' I0 M; J" d
    for(it=drawingsheets->begin();it!=drawingsheets->end();it++)% b8 @- A$ }/ l6 T4 x* ^
    {
- t% ^  k. X0 F$ s: r" ]6 c8 R7 E! Q% C, y* {+ H! y8 Y
        mysheet = *it;
" F- E0 R+ U4 \4 u        mysheet->Open();
2 x( c1 P, _6 i7 c& ~# k5 B- l        // ----------------------------------------------
% x6 S4 p' L7 g; l+ h        //   Menu: Edit->View->Update Views...) d, l( T. B2 G% i
        // ----------------------------------------------
5 P  O/ j7 \+ I/ a! k" Y        theSession->;Parts()->Work()->DraftingViews()->UpdateViews(Drawings::DraftingViewCollection::ViewUpdateOptionAll,mysheet);
( p- P- L: I2 b! n: ?" a8 r
: F8 U- A, j8 a  G+ X' j) E2 M}* z# v0 u/ a' c$ J' B" y
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了