[Lazarus] File not found.

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Apr 14 09:25:41 CEST 2012


On Sat, 14 Apr 2012 00:59:05 +0200
Dave Coventry <dgcoventry at gmail.com> wrote:

> 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;

Should work.

 
> 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.

On which line stops the debugger?

Mattias




More information about the Lazarus mailing list