查看单个帖子
旧 2009-04-12, 06:40 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】how to use getsectionedbody90 funtion

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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)