|
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 |
|