Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening dwg files from a DBgrid

Status
Not open for further replies.

bobbygm

Programmer
Mar 30, 2005
19
IT
Hi everybody!

I'm developing a web application with Delphi 7. I have a DBgrid and some ComboBoxes to perform search operations; the resulting records are the names of some dwg (Autocad drawings) files, and everything works well.
Now I'd like to open those files by clicking on the corresponding cell of the DBgrid. In order to do that, I use the FileOpen function in response to a DBgridCellClick event, giving the full name of the file (I check it with FileExists before, and it's ok) and the opening mode (cardinal).
The procedure runs without giving errors, but the drawing doesn't open on my pc (I guess that, as it is, is too simple!). I want my application to open Autocad and the drawing (or only the drawing if Autocad is already open) in response to clicking on a cell, as if I were double-clicking on the file icon.

Any idea? What can I do to make it work?
thank u very much,

Emanuele
 
Have you looked at the FAQs Delphi with Other Programs?

Andrew
Hampshire, UK
 
if fileexists(file_name)
then begin
fileopen(nome_file, fmopenread or fmShareDenyWrite);
showmessage('ok');
end
else showmessage('the file doesn't exist');


Me again!!!
I'm adding the actual code. The message 'ok' appears and the application keeps running, but nothing happens.
What can I do to open and view the dwg file?

Emanuele
 
thank u very much, Towerbase,
you were of great aid to me.
I almost found the answer to my problem on FAQs.
Still needs some improvement, but I guess I can
make it out now.

Emanuele
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top