OT???? GetHeaderText not working, OleAutomation

Mar 11, 2009 2 Replies

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


Found the answer : I can use excel automation in stead

I think they changed some of the object names or at least how they are called.

TOP engtran.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required