[Lazarus] File not found.

Dave Coventry dgcoventry at gmail.com
Sat Apr 14 00:59:05 CEST 2012


Hi,

I have a unit called extractdwg.pas which contains the following code.

~~~~~~~~~~~~~~~~~~ 8< ~~~~~~~~~~~~~~~~~~~~~
unit extractdwg;

interface

uses
  Classes, Forms, SysUtils,Dialogs,
  dwgsFunctions,dwgglobals,
  Controls;

procedure StartExtract(DWGFilename: string);

var
    BinFile: file;

implementation

uses Unit1;

procedure StartExtract(DWGFilename: string);
var i,j: integer;
    binfile: File;
   longBuff: ^integer;
begin
     Screen.Cursor:=crHourGlass;
     AssignFile(BinFile, DWGFilename);
     Filemode:=0;
     Reset(BinFile,1);
     Seek(BinFile,21);
     ....
     ....
end;
~~~~~~~~~~~~~~~~~~ 8< ~~~~~~~~~~~~~~~~~~~~~

This is called from unit1:

  with OpenDialog1 do
  if Execute then
  begin
    StartExtract(FileName);
  end;

I select a file /home/dave/Documents/ACAD/4m2.dwg (no spaces). The
file name is correctly passed to StartExtract(DWGFilename) but the
program stops with the error message "Project raised exception class
'ElnOutError' with message: File not found.




More information about the Lazarus mailing list