Author Topic: eBadDwgHeader error  (Read 4815 times)

0 Members and 1 Guest are viewing this topic.

Proctor

  • Guest
eBadDwgHeader error
« on: December 14, 2011, 02:22:40 PM »
Hello: I have an app created using Visual Studio 2005 and Autocad 2009 .net api. Recently, a new error pops up
during a command that instructs to open a .dwt file. This file resides off a web server. Here's the error msg: "eBadDwgHeader" ....source acdbmgd

Here's the line of code that it is erroring out on:
Code - vb.net: [Select]
  1. dbTemplate.ReadDwgFile("http://co.com/CoEstimator/Co_TEMPLATE.dwt", System.IO.FileShare.Read, True, Nothing)
  2.  

I don't think I changed anything in my code; perhaps this has something to do with a setting on the webserver.....but wanted to run
it by you and see if anyone's heard of this error before.

Thank you,
Proctor

Alexander Rivilis

  • Bull Frog
  • Posts: 214
  • Programmer from Kyiv (Ukraine)
Re: eBadDwgHeader error
« Reply #1 on: December 14, 2011, 04:43:39 PM »
Are you sure that the method ReadDwgFile can be used path to the web server? I would prefer to copy a file from a server on the HDD, and then open it. IMHO.

Proctor

  • Guest
Re: eBadDwgHeader error
« Reply #2 on: December 14, 2011, 05:13:16 PM »
Thank you for your reply. Yes, this code has always worked....and is still working for the users but has stopped working for me for some reason.

What are the benefits of copying the file to the local drive?
do you know why I might be getting this error?

Thanks again...
Proctor

Alexander Rivilis

  • Bull Frog
  • Posts: 214
  • Programmer from Kyiv (Ukraine)
Re: eBadDwgHeader error
« Reply #3 on: December 15, 2011, 03:38:05 AM »
What are the benefits of copying the file to the local drive?
do you know why I might be getting this error?
I think that's obvious. AutoCAD reads the file not consistently. Http protocol does not allow it to do.