几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】cannot read ibomtable.getheadertext9i0 (http://www.dimcax.com/hust/showthread.php?t=4374)

yang686526 2009-04-12 05:43 PM

【转帖】cannot read ibomtable.getheadertext9i0
 
cannot read ibomtable.getheadertext(i)
hi
dont know where to ask, so here it goes. redirect me to a proper place
if needed.
i am updating some software talking to solidworks 2008, and there
seems to be some change to previous versions.
say (in delphi):
var
view: iview;
bom: ibomtable;
begin
(swpart as idrawingdoc).activatesheet(sheetname);
view := (swpart as idrawingdoc).igetfirstview;
while (view <> nil) and (view.get_name <> viewname) do
view := view.igetnextview;
if view <> nil then begin
bom := view.igetbomtable;
if bom.attach3 then
try
m := bom.gettotalcolumncount;
n := bom.gettotalrowcount;
// everything works well until here...
for i := 0 to m - 1 do begin
colname:= uppercase(trim(bom.getheadertext(i)));
// this is always empty and there are no data to read.
they claim, that it worked in 2006.
any ideas anyone?
wbr
sonnich
answer i found the answer in this group, have to use excel, by ole automation.
quick


所有的时间均为北京时间。 现在的时间是 03:31 PM.