OT???? GetHeaderText not working, OleAutomation

Discussion in 'SolidWorks' started by jodleren, Mar 11, 2009.

  1. jodleren

    jodleren Guest

    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
     
    jodleren, Mar 11, 2009
    #1
  2. jodleren

    jodleren Guest

    Found the answer : I can use excel automation in stead
     
    jodleren, Mar 12, 2009
    #2
  3. jodleren

    manager Guest

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

    TOP
    engtran.com
     
    manager, Mar 13, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.