查看单个帖子
旧 2009-04-12, 05:43 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)