几何尺寸与公差论坛

 找回密码
 注册
查看: 785|回复: 0

【转帖】how to use getsectionedbody90 funtion

[复制链接]
发表于 2009-4-12 18:40:55 | 显示全部楼层 |阅读模式
how to use getsectionedbody() funtion
hi all,
now, i'm studing about solidwork api. this is my problem, if you can, please answers for me
c#:
modeldoc2 doc = (modeldoc2)this.iswapp.activedoc;
modelview view = (modelview)modedoc.activeview;
selectionmgr selectmgr = (selectionmgr)modedoc.selectionmanager;
bool status = modedoc.extension.selectbyid2("???", "plane", 0, 0, 0, true, 1, null, 0);
sectionviewdata viewdata = modedoc.modelviewmanager.createsectionviewdata();
feature obj = (feature)objselectmgr.getselectedobject6(2, -1);
viewdata.firstplane = (object)obj;
viewdata.firstoffset = 0.0;
viewdata.firstreversedirection = false;
viewdata.firstrotationx = 0.0;
viewdata.firstrotationy = 0.0;
viewdata.firstcolor = 255;
viewdata.showsectioncap = true;
bool resutl = modedoc.modelviewmanager.createsectionview(objviewdata);
body2 body = (body2)doc.getsectionedbody(view);
but why body object allways is null ?
edited: 11/24/2008 at 09:30 pm by xuanson trinh
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2025-1-3 10:37 , Processed in 0.036075 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表